From 9109cc869f9528d89e615e80b73ae798af49abf8 Mon Sep 17 00:00:00 2001 From: devexperience Date: Tue, 13 Aug 2024 16:34:00 +0000 Subject: [PATCH] Generated version 0.38.0 This pull request was automatically generated by a GitHub Action to generate version 0.38.0 of this library. --- .openapi-generator/FILES | 18 + docs/CreditCardProduct.md | 44 +++ docs/CreditCardProductResponse.md | 18 + docs/MxPlatformApi.md | 292 +++++++++++++++ docs/RewardResponse.md | 36 ++ docs/RewardResponseBody.md | 18 + docs/RewardsResponse.md | 36 ++ docs/RewardsResponseBody.md | 20 ++ lib/mx-platform-ruby.rb | 6 + lib/mx-platform-ruby/api/mx_platform_api.rb | 276 +++++++++++++++ .../models/credit_card_product.rb | 335 ++++++++++++++++++ .../models/credit_card_product_response.rb | 214 +++++++++++ .../models/reward_response.rb | 295 +++++++++++++++ .../models/reward_response_body.rb | 214 +++++++++++ .../models/rewards_response.rb | 295 +++++++++++++++ .../models/rewards_response_body.rb | 225 ++++++++++++ lib/mx-platform-ruby/version.rb | 2 +- openapi/config.yml | 2 +- spec/api/mx_platform_api_spec.rb | 52 +++ .../credit_card_product_response_spec.rb | 34 ++ spec/models/credit_card_product_spec.rb | 112 ++++++ spec/models/reward_response_body_spec.rb | 34 ++ spec/models/reward_response_spec.rb | 88 +++++ spec/models/rewards_response_body_spec.rb | 40 +++ spec/models/rewards_response_spec.rb | 88 +++++ 25 files changed, 2792 insertions(+), 2 deletions(-) create mode 100644 docs/CreditCardProduct.md create mode 100644 docs/CreditCardProductResponse.md create mode 100644 docs/RewardResponse.md create mode 100644 docs/RewardResponseBody.md create mode 100644 docs/RewardsResponse.md create mode 100644 docs/RewardsResponseBody.md create mode 100644 lib/mx-platform-ruby/models/credit_card_product.rb create mode 100644 lib/mx-platform-ruby/models/credit_card_product_response.rb create mode 100644 lib/mx-platform-ruby/models/reward_response.rb create mode 100644 lib/mx-platform-ruby/models/reward_response_body.rb create mode 100644 lib/mx-platform-ruby/models/rewards_response.rb create mode 100644 lib/mx-platform-ruby/models/rewards_response_body.rb create mode 100644 spec/models/credit_card_product_response_spec.rb create mode 100644 spec/models/credit_card_product_spec.rb create mode 100644 spec/models/reward_response_body_spec.rb create mode 100644 spec/models/reward_response_spec.rb create mode 100644 spec/models/rewards_response_body_spec.rb create mode 100644 spec/models/rewards_response_spec.rb diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 4c11e27..88a356b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -35,6 +35,8 @@ docs/ConnectWidgetResponseBody.md docs/CredentialRequest.md docs/CredentialResponse.md docs/CredentialsResponseBody.md +docs/CreditCardProduct.md +docs/CreditCardProductResponse.md docs/EnhanceTransactionResponse.md docs/EnhanceTransactionsRequest.md docs/EnhanceTransactionsRequestBody.md @@ -88,6 +90,10 @@ docs/PaymentProcessorAuthorizationCodeRequest.md docs/PaymentProcessorAuthorizationCodeRequestBody.md docs/PaymentProcessorAuthorizationCodeResponse.md docs/PaymentProcessorAuthorizationCodeResponseBody.md +docs/RewardResponse.md +docs/RewardResponseBody.md +docs/RewardsResponse.md +docs/RewardsResponseBody.md docs/ScheduledPaymentResponse.md docs/ScheduledPaymentsResponseBody.md docs/SpendingPlanAccountResponse.md @@ -181,6 +187,8 @@ lib/mx-platform-ruby/models/connect_widget_response_body.rb lib/mx-platform-ruby/models/credential_request.rb lib/mx-platform-ruby/models/credential_response.rb lib/mx-platform-ruby/models/credentials_response_body.rb +lib/mx-platform-ruby/models/credit_card_product.rb +lib/mx-platform-ruby/models/credit_card_product_response.rb lib/mx-platform-ruby/models/enhance_transaction_response.rb lib/mx-platform-ruby/models/enhance_transactions_request.rb lib/mx-platform-ruby/models/enhance_transactions_request_body.rb @@ -232,6 +240,10 @@ 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/reward_response.rb +lib/mx-platform-ruby/models/reward_response_body.rb +lib/mx-platform-ruby/models/rewards_response.rb +lib/mx-platform-ruby/models/rewards_response_body.rb lib/mx-platform-ruby/models/scheduled_payment_response.rb lib/mx-platform-ruby/models/scheduled_payments_response_body.rb lib/mx-platform-ruby/models/spending_plan_account_response.rb @@ -324,6 +336,8 @@ spec/models/connect_widget_response_spec.rb spec/models/credential_request_spec.rb spec/models/credential_response_spec.rb spec/models/credentials_response_body_spec.rb +spec/models/credit_card_product_response_spec.rb +spec/models/credit_card_product_spec.rb spec/models/enhance_transaction_response_spec.rb spec/models/enhance_transactions_request_body_spec.rb spec/models/enhance_transactions_request_spec.rb @@ -375,6 +389,10 @@ 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/reward_response_body_spec.rb +spec/models/reward_response_spec.rb +spec/models/rewards_response_body_spec.rb +spec/models/rewards_response_spec.rb spec/models/scheduled_payment_response_spec.rb spec/models/scheduled_payments_response_body_spec.rb spec/models/spending_plan_account_response_spec.rb diff --git a/docs/CreditCardProduct.md b/docs/CreditCardProduct.md new file mode 100644 index 0000000..5b64292 --- /dev/null +++ b/docs/CreditCardProduct.md @@ -0,0 +1,44 @@ +# MxPlatformRuby::CreditCardProduct + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **annual_fee** | **Object** | | [optional] | +| **duration_of_introductory_rate_on_balance_transfer** | **Object** | | [optional] | +| **duration_of_introductory_rate_on_purchases** | **Object** | | [optional] | +| **guid** | **Object** | | [optional] | +| **has_cashback_rewards** | **Boolean** | | [optional] | +| **has_other_rewards** | **Boolean** | | [optional] | +| **has_travel_rewards** | **Boolean** | | [optional] | +| **has_zero_introductory_annual_fee** | **Boolean** | | [optional] | +| **has_zero_percent_introductory_rate** | **Boolean** | | [optional] | +| **has_zero_percent_introductory_rate_on_balance_transfer** | **Boolean** | | [optional] | +| **financial_institution** | **Boolean** | | [optional] | +| **is_accepting_applications** | **Boolean** | | [optional] | +| **is_small_business_card** | **Boolean** | | [optional] | +| **name** | **String** | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::CreditCardProduct.new( + annual_fee: 45.0, + duration_of_introductory_rate_on_balance_transfer: null, + duration_of_introductory_rate_on_purchases: null, + guid: CCA-b5bcd822-6d01-4e23-b8d6-846a225e714a, + has_cashback_rewards: false, + has_other_rewards: true, + has_travel_rewards: true, + has_zero_introductory_annual_fee: true, + has_zero_percent_introductory_rate: false, + has_zero_percent_introductory_rate_on_balance_transfer: true, + financial_institution: true, + is_accepting_applications: true, + is_small_business_card: true, + name: Chase Credit Card +) +``` + diff --git a/docs/CreditCardProductResponse.md b/docs/CreditCardProductResponse.md new file mode 100644 index 0000000..21302a3 --- /dev/null +++ b/docs/CreditCardProductResponse.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::CreditCardProductResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **reward** | [**CreditCardProduct**](CreditCardProduct.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::CreditCardProductResponse.new( + reward: null +) +``` + diff --git a/docs/MxPlatformApi.md b/docs/MxPlatformApi.md index f2623b6..74c3e80 100644 --- a/docs/MxPlatformApi.md +++ b/docs/MxPlatformApi.md @@ -16,6 +16,7 @@ All URIs are relative to *https://api.mx.com* | [**create_tagging**](MxPlatformApi.md#create_tagging) | **POST** /users/{user_guid}/taggings | Create tagging | | [**create_transaction_rule**](MxPlatformApi.md#create_transaction_rule) | **POST** /users/{user_guid}/transaction_rules | Create transaction rule | | [**create_user**](MxPlatformApi.md#create_user) | **POST** /users | Create user | +| [**credit_card**](MxPlatformApi.md#credit_card) | **GET** /credit_card_products/{credit_card_product_guid} | Read a Credit Card Product | | [**delete_category**](MxPlatformApi.md#delete_category) | **DELETE** /users/{user_guid}/categories/{category_guid} | Delete category | | [**delete_managed_account**](MxPlatformApi.md#delete_managed_account) | **DELETE** /users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid} | Delete managed account | | [**delete_managed_member**](MxPlatformApi.md#delete_managed_member) | **DELETE** /users/{user_guid}/managed_members/{member_guid} | Delete managed member | @@ -31,6 +32,7 @@ All URIs are relative to *https://api.mx.com* | [**download_tax_document**](MxPlatformApi.md#download_tax_document) | **GET** /users/{user_guid}/members/{member_guid}/tax_documents/{tax_document_guid}.pdf | Download a Tax Document 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 | +| [**fetch_rewards**](MxPlatformApi.md#fetch_rewards) | **POST** /users/{user_guid}/members/{member_guid}/fetch_rewards | Fetch Rewards | | [**fetch_statements**](MxPlatformApi.md#fetch_statements) | **POST** /users/{user_guid}/members/{member_guid}/fetch_statements | Fetch statements | | [**fetch_tax_documents**](MxPlatformApi.md#fetch_tax_documents) | **POST** /users/{user_guid}/members/{member_guid}/fetch_tax_documents | Fetch Tax Documents | | [**identify_member**](MxPlatformApi.md#identify_member) | **POST** /users/{user_guid}/members/{member_guid}/identify | Identify member | @@ -55,6 +57,7 @@ All URIs are relative to *https://api.mx.com* | [**list_member_credentials**](MxPlatformApi.md#list_member_credentials) | **GET** /users/{user_guid}/members/{member_guid}/credentials | List member credentials | | [**list_members**](MxPlatformApi.md#list_members) | **GET** /users/{user_guid}/members | List members | | [**list_merchants**](MxPlatformApi.md#list_merchants) | **GET** /merchants | List merchants | +| [**list_rewards**](MxPlatformApi.md#list_rewards) | **GET** /users/{user_guid}/members/{member_guid}/rewards | List Rewards | | [**list_statements_by_member**](MxPlatformApi.md#list_statements_by_member) | **GET** /users/{user_guid}/members/{member_guid}/statements | List statements by member | | [**list_taggings**](MxPlatformApi.md#list_taggings) | **GET** /users/{user_guid}/taggings | List taggings | | [**list_tags**](MxPlatformApi.md#list_tags) | **GET** /users/{user_guid}/tags | List tags | @@ -79,6 +82,7 @@ All URIs are relative to *https://api.mx.com* | [**read_member_status**](MxPlatformApi.md#read_member_status) | **GET** /users/{user_guid}/members/{member_guid}/status | Read member status | | [**read_merchant**](MxPlatformApi.md#read_merchant) | **GET** /merchants/{merchant_guid} | Read merchant | | [**read_merchant_location**](MxPlatformApi.md#read_merchant_location) | **GET** /merchant_locations/{merchant_location_guid} | Read merchant location | +| [**read_rewards**](MxPlatformApi.md#read_rewards) | **GET** /users/{user_guid}/members/{member_guid}/rewards/{reward_guid} | Read Reward | | [**read_statement_by_member**](MxPlatformApi.md#read_statement_by_member) | **GET** /users/{user_guid}/members/{member_guid}/statements/{statement_guid} | Read statement by member | | [**read_tag**](MxPlatformApi.md#read_tag) | **GET** /users/{user_guid}/tags/{tag_guid} | Read tag | | [**read_tagging**](MxPlatformApi.md#read_tagging) | **GET** /users/{user_guid}/taggings/{tagging_guid} | Read tagging | @@ -973,6 +977,76 @@ end - **Accept**: application/vnd.mx.api.v1+json +## credit_card + +> credit_card(credit_card_product_guid) + +Read a Credit Card Product + +This endpoint returns the specified `credit_card_product` according to the unique GUID. + +### 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 +credit_card_product_guid = 'credit_card_product_guid' # String | The required `credit_card_product_guid` can be found on the `account` object. + +begin + # Read a Credit Card Product + result = api_instance.credit_card(credit_card_product_guid) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->credit_card: #{e}" +end +``` + +#### Using the credit_card_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> credit_card_with_http_info(credit_card_product_guid) + +```ruby +begin + # Read a Credit Card Product + data, status_code, headers = api_instance.credit_card_with_http_info(credit_card_product_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->credit_card_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **credit_card_product_guid** | **String** | The required `credit_card_product_guid` can be found on the `account` object. | | + +### Return type + +[**CreditCardProductResponse**](CreditCardProductResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.mx.api.v1+json + + ## delete_category > delete_category(category_guid, user_guid) @@ -2047,6 +2121,78 @@ end - **Accept**: application/vnd.mx.api.v1+json +## fetch_rewards + +> fetch_rewards(user_guid, member_guid) + +Fetch Rewards + +Calling this endpoint initiates an aggregation-type event which will gather the member's rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. + +### 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 +user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`. +member_guid = 'MBR-fa7537f3-48aa-a683-a02a-b18345562f54' # String | The unique identifier for the member. Defined by MX. + +begin + # Fetch Rewards + result = api_instance.fetch_rewards(user_guid, member_guid) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->fetch_rewards: #{e}" +end +``` + +#### Using the fetch_rewards_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> fetch_rewards_with_http_info(user_guid, member_guid) + +```ruby +begin + # Fetch Rewards + data, status_code, headers = api_instance.fetch_rewards_with_http_info(user_guid, member_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->fetch_rewards_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique id for a `user`. | | +| **member_guid** | **String** | The unique identifier for the member. Defined by MX. | | + +### Return type + +[**MemberResponseBody**](MemberResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.mx.api.v1+json + + ## fetch_statements > fetch_statements(member_guid, user_guid) @@ -3895,6 +4041,78 @@ end - **Accept**: application/vnd.mx.api.v1+json +## list_rewards + +> list_rewards(user_guid, member_guid) + +List Rewards + +Use this endpoint to list all the `rewards` associated with a 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 +user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`. +member_guid = 'MBR-fa7537f3-48aa-a683-a02a-b18345562f54' # String | The unique identifier for the member. Defined by MX. + +begin + # List Rewards + result = api_instance.list_rewards(user_guid, member_guid) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->list_rewards: #{e}" +end +``` + +#### Using the list_rewards_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_rewards_with_http_info(user_guid, member_guid) + +```ruby +begin + # List Rewards + data, status_code, headers = api_instance.list_rewards_with_http_info(user_guid, member_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->list_rewards_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique id for a `user`. | | +| **member_guid** | **String** | The unique identifier for the member. Defined by MX. | | + +### Return type + +[**RewardsResponseBody**](RewardsResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.mx.api.v1+json + + ## list_statements_by_member > list_statements_by_member(member_guid, user_guid, opts) @@ -5701,6 +5919,80 @@ end - **Accept**: application/vnd.mx.api.v1+json +## read_rewards + +> read_rewards(user_guid, member_guid, reward_guid) + +Read Reward + +Use this endpoint to read a specific `reward` based on its unique GUID.. + +### 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 +user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`. +member_guid = 'MBR-fa7537f3-48aa-a683-a02a-b18345562f54' # String | The unique identifier for the member. Defined by MX. +reward_guid = 'RWD-fa7537f3-48aa-a683-a02a-b324322f54' # String | The unique identifier for the rewards. Defined by MX. + +begin + # Read Reward + result = api_instance.read_rewards(user_guid, member_guid, reward_guid) + p result +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->read_rewards: #{e}" +end +``` + +#### Using the read_rewards_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_rewards_with_http_info(user_guid, member_guid, reward_guid) + +```ruby +begin + # Read Reward + data, status_code, headers = api_instance.read_rewards_with_http_info(user_guid, member_guid, reward_guid) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MxPlatformRuby::ApiError => e + puts "Error when calling MxPlatformApi->read_rewards_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **user_guid** | **String** | The unique id for a `user`. | | +| **member_guid** | **String** | The unique identifier for the member. Defined by MX. | | +| **reward_guid** | **String** | The unique identifier for the rewards. Defined by MX. | | + +### Return type + +[**RewardResponseBody**](RewardResponseBody.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.mx.api.v1+json + + ## read_statement_by_member > read_statement_by_member(member_guid, statement_guid, user_guid) diff --git a/docs/RewardResponse.md b/docs/RewardResponse.md new file mode 100644 index 0000000..9c3a62e --- /dev/null +++ b/docs/RewardResponse.md @@ -0,0 +1,36 @@ +# MxPlatformRuby::RewardResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_guid** | **String** | | [optional] | +| **balance_type** | **String** | | [optional] | +| **balance** | **Integer** | | [optional] | +| **created_at** | **String** | | [optional] | +| **description** | **String** | | [optional] | +| **expires_on** | **String** | | [optional] | +| **guid** | **String** | | [optional] | +| **member_guid** | **String** | | [optional] | +| **unit_type** | **String** | | [optional] | +| **user_guid** | **String** | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::RewardResponse.new( + account_guid: ACT-1234, + balance_type: EXPIRING_BALANCE, + balance: 102, + created_at: 2020-01-28T21:09:01+0000, + description: A description of the reward., + expires_on: 2020-02-28, + guid: RWD-1234, + member_guid: MBR-4567, + unit_type: POINTS, + user_guid: USR-1234 +) +``` + diff --git a/docs/RewardResponseBody.md b/docs/RewardResponseBody.md new file mode 100644 index 0000000..a2def06 --- /dev/null +++ b/docs/RewardResponseBody.md @@ -0,0 +1,18 @@ +# MxPlatformRuby::RewardResponseBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **reward** | [**RewardResponse**](RewardResponse.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::RewardResponseBody.new( + reward: null +) +``` + diff --git a/docs/RewardsResponse.md b/docs/RewardsResponse.md new file mode 100644 index 0000000..db1950d --- /dev/null +++ b/docs/RewardsResponse.md @@ -0,0 +1,36 @@ +# MxPlatformRuby::RewardsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_guid** | **String** | | [optional] | +| **balance_type** | **String** | | [optional] | +| **balance** | **Integer** | | [optional] | +| **created_at** | **String** | | [optional] | +| **description** | **String** | | [optional] | +| **expires_on** | **String** | | [optional] | +| **guid** | **String** | | [optional] | +| **member_guid** | **String** | | [optional] | +| **unit_type** | **String** | | [optional] | +| **user_guid** | **String** | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::RewardsResponse.new( + account_guid: ACT-1234, + balance_type: EXPIRING_BALANCE, + balance: 102, + created_at: 2020-01-28T21:09:01+0000, + description: A description of the reward., + expires_on: 2020-02-28, + guid: RWD-1234, + member_guid: MBR-4567, + unit_type: POINTS, + user_guid: USR-1234 +) +``` + diff --git a/docs/RewardsResponseBody.md b/docs/RewardsResponseBody.md new file mode 100644 index 0000000..001db60 --- /dev/null +++ b/docs/RewardsResponseBody.md @@ -0,0 +1,20 @@ +# MxPlatformRuby::RewardsResponseBody + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **rewards** | [**Array<RewardsResponse>**](RewardsResponse.md) | | [optional] | +| **pagination** | [**PaginationResponse**](PaginationResponse.md) | | [optional] | + +## Example + +```ruby +require 'mx-platform-ruby' + +instance = MxPlatformRuby::RewardsResponseBody.new( + rewards: null, + pagination: null +) +``` + diff --git a/lib/mx-platform-ruby.rb b/lib/mx-platform-ruby.rb index 89026be..ce11c82 100644 --- a/lib/mx-platform-ruby.rb +++ b/lib/mx-platform-ruby.rb @@ -48,6 +48,8 @@ require 'mx-platform-ruby/models/credential_request' require 'mx-platform-ruby/models/credential_response' require 'mx-platform-ruby/models/credentials_response_body' +require 'mx-platform-ruby/models/credit_card_product' +require 'mx-platform-ruby/models/credit_card_product_response' require 'mx-platform-ruby/models/enhance_transaction_response' require 'mx-platform-ruby/models/enhance_transactions_request' require 'mx-platform-ruby/models/enhance_transactions_request_body' @@ -99,6 +101,10 @@ 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/reward_response' +require 'mx-platform-ruby/models/reward_response_body' +require 'mx-platform-ruby/models/rewards_response' +require 'mx-platform-ruby/models/rewards_response_body' require 'mx-platform-ruby/models/scheduled_payment_response' require 'mx-platform-ruby/models/scheduled_payments_response_body' require 'mx-platform-ruby/models/spending_plan_account_response' diff --git a/lib/mx-platform-ruby/api/mx_platform_api.rb b/lib/mx-platform-ruby/api/mx_platform_api.rb index 6a1d2cd..13fd1eb 100644 --- a/lib/mx-platform-ruby/api/mx_platform_api.rb +++ b/lib/mx-platform-ruby/api/mx_platform_api.rb @@ -909,6 +909,69 @@ def create_user_with_http_info(user_create_request_body, opts = {}) return data, status_code, headers end + # Read a Credit Card Product + # This endpoint returns the specified `credit_card_product` according to the unique GUID. + # @param credit_card_product_guid [String] The required `credit_card_product_guid` can be found on the `account` object. + # @param [Hash] opts the optional parameters + # @return [CreditCardProductResponse] + def credit_card(credit_card_product_guid, opts = {}) + data, _status_code, _headers = credit_card_with_http_info(credit_card_product_guid, opts) + data + end + + # Read a Credit Card Product + # This endpoint returns the specified `credit_card_product` according to the unique GUID. + # @param credit_card_product_guid [String] The required `credit_card_product_guid` can be found on the `account` object. + # @param [Hash] opts the optional parameters + # @return [Array<(CreditCardProductResponse, Integer, Hash)>] CreditCardProductResponse data, response status code and response headers + def credit_card_with_http_info(credit_card_product_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MxPlatformApi.credit_card ...' + end + # verify the required parameter 'credit_card_product_guid' is set + if @api_client.config.client_side_validation && credit_card_product_guid.nil? + fail ArgumentError, "Missing the required parameter 'credit_card_product_guid' when calling MxPlatformApi.credit_card" + end + # resource path + local_var_path = '/credit_card_products/{credit_card_product_guid}'.sub('{' + 'credit_card_product_guid' + '}', CGI.escape(credit_card_product_guid.to_s)) + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CreditCardProductResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"MxPlatformApi.credit_card", + :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(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MxPlatformApi#credit_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete category # Use this endpoint to delete a specific custom category according to its unique GUID. The API will respond with an empty object and a status of `204 No Content`. # @param category_guid [String] The unique id for a `category`. @@ -1946,6 +2009,75 @@ def extend_history_with_http_info(member_guid, user_guid, opts = {}) return data, status_code, headers end + # Fetch Rewards + # Calling this endpoint initiates an aggregation-type event which will gather the member's rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. + # @param user_guid [String] The unique id for a `user`. + # @param member_guid [String] The unique identifier for the member. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [MemberResponseBody] + def fetch_rewards(user_guid, member_guid, opts = {}) + data, _status_code, _headers = fetch_rewards_with_http_info(user_guid, member_guid, opts) + data + end + + # Fetch Rewards + # Calling this endpoint initiates an aggregation-type event which will gather the member's rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. + # @param user_guid [String] The unique id for a `user`. + # @param member_guid [String] The unique identifier for the member. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [Array<(MemberResponseBody, Integer, Hash)>] MemberResponseBody data, response status code and response headers + def fetch_rewards_with_http_info(user_guid, member_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MxPlatformApi.fetch_rewards ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.fetch_rewards" + end + # verify the required parameter 'member_guid' is set + if @api_client.config.client_side_validation && member_guid.nil? + fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.fetch_rewards" + end + # resource path + local_var_path = '/users/{user_guid}/members/{member_guid}/fetch_rewards'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)) + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'MemberResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"MxPlatformApi.fetch_rewards", + :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#fetch_rewards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Fetch statements # Use this endpoint to fetch the statements associated with a particular member. # @param member_guid [String] The unique id for a `member`. @@ -3674,6 +3806,75 @@ def list_merchants_with_http_info(opts = {}) return data, status_code, headers end + # List Rewards + # Use this endpoint to list all the `rewards` associated with a specified `member`. + # @param user_guid [String] The unique id for a `user`. + # @param member_guid [String] The unique identifier for the member. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [RewardsResponseBody] + def list_rewards(user_guid, member_guid, opts = {}) + data, _status_code, _headers = list_rewards_with_http_info(user_guid, member_guid, opts) + data + end + + # List Rewards + # Use this endpoint to list all the `rewards` associated with a specified `member`. + # @param user_guid [String] The unique id for a `user`. + # @param member_guid [String] The unique identifier for the member. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [Array<(RewardsResponseBody, Integer, Hash)>] RewardsResponseBody data, response status code and response headers + def list_rewards_with_http_info(user_guid, member_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MxPlatformApi.list_rewards ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.list_rewards" + end + # verify the required parameter 'member_guid' is set + if @api_client.config.client_side_validation && member_guid.nil? + fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.list_rewards" + end + # resource path + local_var_path = '/users/{user_guid}/members/{member_guid}/rewards'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)) + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'RewardsResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"MxPlatformApi.list_rewards", + :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(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MxPlatformApi#list_rewards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List statements by member # Use this endpoint to get an array of available statements. # @param member_guid [String] The unique id for a `member`. @@ -5393,6 +5594,81 @@ def read_merchant_location_with_http_info(merchant_location_guid, opts = {}) return data, status_code, headers end + # Read Reward + # Use this endpoint to read a specific `reward` based on its unique GUID.. + # @param user_guid [String] The unique id for a `user`. + # @param member_guid [String] The unique identifier for the member. Defined by MX. + # @param reward_guid [String] The unique identifier for the rewards. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [RewardResponseBody] + def read_rewards(user_guid, member_guid, reward_guid, opts = {}) + data, _status_code, _headers = read_rewards_with_http_info(user_guid, member_guid, reward_guid, opts) + data + end + + # Read Reward + # Use this endpoint to read a specific `reward` based on its unique GUID.. + # @param user_guid [String] The unique id for a `user`. + # @param member_guid [String] The unique identifier for the member. Defined by MX. + # @param reward_guid [String] The unique identifier for the rewards. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [Array<(RewardResponseBody, Integer, Hash)>] RewardResponseBody data, response status code and response headers + def read_rewards_with_http_info(user_guid, member_guid, reward_guid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MxPlatformApi.read_rewards ...' + end + # verify the required parameter 'user_guid' is set + if @api_client.config.client_side_validation && user_guid.nil? + fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.read_rewards" + end + # verify the required parameter 'member_guid' is set + if @api_client.config.client_side_validation && member_guid.nil? + fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.read_rewards" + end + # verify the required parameter 'reward_guid' is set + if @api_client.config.client_side_validation && reward_guid.nil? + fail ArgumentError, "Missing the required parameter 'reward_guid' when calling MxPlatformApi.read_rewards" + end + # resource path + local_var_path = '/users/{user_guid}/members/{member_guid}/rewards/{reward_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'reward_guid' + '}', CGI.escape(reward_guid.to_s)) + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'RewardResponseBody' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basicAuth'] + + new_options = opts.merge( + :operation => :"MxPlatformApi.read_rewards", + :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(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MxPlatformApi#read_rewards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Read statement by member # Use this endpoint to read a JSON representation of the statement. # @param member_guid [String] The unique id for a `member`. diff --git a/lib/mx-platform-ruby/models/credit_card_product.rb b/lib/mx-platform-ruby/models/credit_card_product.rb new file mode 100644 index 0000000..9d49bf4 --- /dev/null +++ b/lib/mx-platform-ruby/models/credit_card_product.rb @@ -0,0 +1,335 @@ +=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: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class CreditCardProduct + attr_accessor :annual_fee + + attr_accessor :duration_of_introductory_rate_on_balance_transfer + + attr_accessor :duration_of_introductory_rate_on_purchases + + attr_accessor :guid + + attr_accessor :has_cashback_rewards + + attr_accessor :has_other_rewards + + attr_accessor :has_travel_rewards + + attr_accessor :has_zero_introductory_annual_fee + + attr_accessor :has_zero_percent_introductory_rate + + attr_accessor :has_zero_percent_introductory_rate_on_balance_transfer + + attr_accessor :financial_institution + + attr_accessor :is_accepting_applications + + attr_accessor :is_small_business_card + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'annual_fee' => :'annual_fee', + :'duration_of_introductory_rate_on_balance_transfer' => :'duration_of_introductory_rate_on_balance_transfer', + :'duration_of_introductory_rate_on_purchases' => :'duration_of_introductory_rate_on_purchases', + :'guid' => :'guid', + :'has_cashback_rewards' => :'has_cashback_rewards', + :'has_other_rewards' => :'has_other_rewards', + :'has_travel_rewards' => :'has_travel_rewards', + :'has_zero_introductory_annual_fee' => :'has_zero_introductory_annual_fee', + :'has_zero_percent_introductory_rate' => :'has_zero_percent_introductory_rate', + :'has_zero_percent_introductory_rate_on_balance_transfer' => :'has_zero_percent_introductory_rate_on_balance_transfer', + :'financial_institution' => :'financial_institution', + :'is_accepting_applications' => :'is_accepting_applications', + :'is_small_business_card' => :'is_small_business_card', + :'name' => :'name' + } + 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 + { + :'annual_fee' => :'Object', + :'duration_of_introductory_rate_on_balance_transfer' => :'Object', + :'duration_of_introductory_rate_on_purchases' => :'Object', + :'guid' => :'Object', + :'has_cashback_rewards' => :'Boolean', + :'has_other_rewards' => :'Boolean', + :'has_travel_rewards' => :'Boolean', + :'has_zero_introductory_annual_fee' => :'Boolean', + :'has_zero_percent_introductory_rate' => :'Boolean', + :'has_zero_percent_introductory_rate_on_balance_transfer' => :'Boolean', + :'financial_institution' => :'Boolean', + :'is_accepting_applications' => :'Boolean', + :'is_small_business_card' => :'Boolean', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'annual_fee', + :'duration_of_introductory_rate_on_balance_transfer', + :'duration_of_introductory_rate_on_purchases', + :'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::CreditCardProduct` 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::CreditCardProduct`. 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?(:'annual_fee') + self.annual_fee = attributes[:'annual_fee'] + end + + if attributes.key?(:'duration_of_introductory_rate_on_balance_transfer') + self.duration_of_introductory_rate_on_balance_transfer = attributes[:'duration_of_introductory_rate_on_balance_transfer'] + end + + if attributes.key?(:'duration_of_introductory_rate_on_purchases') + self.duration_of_introductory_rate_on_purchases = attributes[:'duration_of_introductory_rate_on_purchases'] + end + + if attributes.key?(:'guid') + self.guid = attributes[:'guid'] + end + + if attributes.key?(:'has_cashback_rewards') + self.has_cashback_rewards = attributes[:'has_cashback_rewards'] + end + + if attributes.key?(:'has_other_rewards') + self.has_other_rewards = attributes[:'has_other_rewards'] + end + + if attributes.key?(:'has_travel_rewards') + self.has_travel_rewards = attributes[:'has_travel_rewards'] + end + + if attributes.key?(:'has_zero_introductory_annual_fee') + self.has_zero_introductory_annual_fee = attributes[:'has_zero_introductory_annual_fee'] + end + + if attributes.key?(:'has_zero_percent_introductory_rate') + self.has_zero_percent_introductory_rate = attributes[:'has_zero_percent_introductory_rate'] + end + + if attributes.key?(:'has_zero_percent_introductory_rate_on_balance_transfer') + self.has_zero_percent_introductory_rate_on_balance_transfer = attributes[:'has_zero_percent_introductory_rate_on_balance_transfer'] + end + + if attributes.key?(:'financial_institution') + self.financial_institution = attributes[:'financial_institution'] + end + + if attributes.key?(:'is_accepting_applications') + self.is_accepting_applications = attributes[:'is_accepting_applications'] + end + + if attributes.key?(:'is_small_business_card') + self.is_small_business_card = attributes[:'is_small_business_card'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + 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? + warn '[DEPRECATED] the `valid?` method is obsolete' + 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 && + annual_fee == o.annual_fee && + duration_of_introductory_rate_on_balance_transfer == o.duration_of_introductory_rate_on_balance_transfer && + duration_of_introductory_rate_on_purchases == o.duration_of_introductory_rate_on_purchases && + guid == o.guid && + has_cashback_rewards == o.has_cashback_rewards && + has_other_rewards == o.has_other_rewards && + has_travel_rewards == o.has_travel_rewards && + has_zero_introductory_annual_fee == o.has_zero_introductory_annual_fee && + has_zero_percent_introductory_rate == o.has_zero_percent_introductory_rate && + has_zero_percent_introductory_rate_on_balance_transfer == o.has_zero_percent_introductory_rate_on_balance_transfer && + financial_institution == o.financial_institution && + is_accepting_applications == o.is_accepting_applications && + is_small_business_card == o.is_small_business_card && + name == o.name + 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 + [annual_fee, duration_of_introductory_rate_on_balance_transfer, duration_of_introductory_rate_on_purchases, guid, has_cashback_rewards, has_other_rewards, has_travel_rewards, has_zero_introductory_annual_fee, has_zero_percent_introductory_rate, has_zero_percent_introductory_rate_on_balance_transfer, financial_institution, is_accepting_applications, is_small_business_card, name].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) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{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[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._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/credit_card_product_response.rb b/lib/mx-platform-ruby/models/credit_card_product_response.rb new file mode 100644 index 0000000..97e3e41 --- /dev/null +++ b/lib/mx-platform-ruby/models/credit_card_product_response.rb @@ -0,0 +1,214 @@ +=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: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class CreditCardProductResponse + attr_accessor :reward + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reward' => :'reward' + } + 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 + { + :'reward' => :'CreditCardProduct' + } + 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::CreditCardProductResponse` 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::CreditCardProductResponse`. 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?(:'reward') + self.reward = attributes[:'reward'] + 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 + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + 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? + warn '[DEPRECATED] the `valid?` method is obsolete' + 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 && + reward == o.reward + 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 + [reward].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) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{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[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._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/reward_response.rb b/lib/mx-platform-ruby/models/reward_response.rb new file mode 100644 index 0000000..82597f5 --- /dev/null +++ b/lib/mx-platform-ruby/models/reward_response.rb @@ -0,0 +1,295 @@ +=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: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class RewardResponse + attr_accessor :account_guid + + attr_accessor :balance_type + + attr_accessor :balance + + attr_accessor :created_at + + attr_accessor :description + + attr_accessor :expires_on + + attr_accessor :guid + + attr_accessor :member_guid + + attr_accessor :unit_type + + attr_accessor :user_guid + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_guid' => :'account_guid', + :'balance_type' => :'balance_type', + :'balance' => :'balance', + :'created_at' => :'created_at', + :'description' => :'description', + :'expires_on' => :'expires_on', + :'guid' => :'guid', + :'member_guid' => :'member_guid', + :'unit_type' => :'unit_type', + :'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', + :'balance_type' => :'String', + :'balance' => :'Integer', + :'created_at' => :'String', + :'description' => :'String', + :'expires_on' => :'String', + :'guid' => :'String', + :'member_guid' => :'String', + :'unit_type' => :'String', + :'user_guid' => :'String' + } + 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::RewardResponse` 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::RewardResponse`. 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?(:'balance_type') + self.balance_type = attributes[:'balance_type'] + end + + if attributes.key?(:'balance') + self.balance = attributes[:'balance'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'expires_on') + self.expires_on = attributes[:'expires_on'] + end + + if attributes.key?(:'guid') + self.guid = attributes[:'guid'] + end + + if attributes.key?(:'member_guid') + self.member_guid = attributes[:'member_guid'] + end + + if attributes.key?(:'unit_type') + self.unit_type = attributes[:'unit_type'] + 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 + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + 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? + warn '[DEPRECATED] the `valid?` method is obsolete' + 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 && + balance_type == o.balance_type && + balance == o.balance && + created_at == o.created_at && + description == o.description && + expires_on == o.expires_on && + guid == o.guid && + member_guid == o.member_guid && + unit_type == o.unit_type && + 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, balance_type, balance, created_at, description, expires_on, guid, member_guid, unit_type, 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) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{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[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._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/reward_response_body.rb b/lib/mx-platform-ruby/models/reward_response_body.rb new file mode 100644 index 0000000..118f1fc --- /dev/null +++ b/lib/mx-platform-ruby/models/reward_response_body.rb @@ -0,0 +1,214 @@ +=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: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class RewardResponseBody + attr_accessor :reward + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reward' => :'reward' + } + 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 + { + :'reward' => :'RewardResponse' + } + 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::RewardResponseBody` 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::RewardResponseBody`. 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?(:'reward') + self.reward = attributes[:'reward'] + 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 + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + 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? + warn '[DEPRECATED] the `valid?` method is obsolete' + 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 && + reward == o.reward + 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 + [reward].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) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{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[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._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/rewards_response.rb b/lib/mx-platform-ruby/models/rewards_response.rb new file mode 100644 index 0000000..c8571da --- /dev/null +++ b/lib/mx-platform-ruby/models/rewards_response.rb @@ -0,0 +1,295 @@ +=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: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class RewardsResponse + attr_accessor :account_guid + + attr_accessor :balance_type + + attr_accessor :balance + + attr_accessor :created_at + + attr_accessor :description + + attr_accessor :expires_on + + attr_accessor :guid + + attr_accessor :member_guid + + attr_accessor :unit_type + + attr_accessor :user_guid + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_guid' => :'account_guid', + :'balance_type' => :'balance_type', + :'balance' => :'balance', + :'created_at' => :'created_at', + :'description' => :'description', + :'expires_on' => :'expires_on', + :'guid' => :'guid', + :'member_guid' => :'member_guid', + :'unit_type' => :'unit_type', + :'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', + :'balance_type' => :'String', + :'balance' => :'Integer', + :'created_at' => :'String', + :'description' => :'String', + :'expires_on' => :'String', + :'guid' => :'String', + :'member_guid' => :'String', + :'unit_type' => :'String', + :'user_guid' => :'String' + } + 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::RewardsResponse` 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::RewardsResponse`. 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?(:'balance_type') + self.balance_type = attributes[:'balance_type'] + end + + if attributes.key?(:'balance') + self.balance = attributes[:'balance'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'expires_on') + self.expires_on = attributes[:'expires_on'] + end + + if attributes.key?(:'guid') + self.guid = attributes[:'guid'] + end + + if attributes.key?(:'member_guid') + self.member_guid = attributes[:'member_guid'] + end + + if attributes.key?(:'unit_type') + self.unit_type = attributes[:'unit_type'] + 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 + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + 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? + warn '[DEPRECATED] the `valid?` method is obsolete' + 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 && + balance_type == o.balance_type && + balance == o.balance && + created_at == o.created_at && + description == o.description && + expires_on == o.expires_on && + guid == o.guid && + member_guid == o.member_guid && + unit_type == o.unit_type && + 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, balance_type, balance, created_at, description, expires_on, guid, member_guid, unit_type, 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) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{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[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._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/rewards_response_body.rb b/lib/mx-platform-ruby/models/rewards_response_body.rb new file mode 100644 index 0000000..31f790b --- /dev/null +++ b/lib/mx-platform-ruby/models/rewards_response_body.rb @@ -0,0 +1,225 @@ +=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: 7.0.1 + +=end + +require 'date' +require 'time' + +module MxPlatformRuby + class RewardsResponseBody + attr_accessor :rewards + + attr_accessor :pagination + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'rewards' => :'rewards', + :'pagination' => :'pagination' + } + 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 + { + :'rewards' => :'Array', + :'pagination' => :'PaginationResponse' + } + 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::RewardsResponseBody` 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::RewardsResponseBody`. 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?(:'rewards') + if (value = attributes[:'rewards']).is_a?(Array) + self.rewards = value + end + end + + if attributes.key?(:'pagination') + self.pagination = attributes[:'pagination'] + 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 + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + 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? + warn '[DEPRECATED] the `valid?` method is obsolete' + 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 && + rewards == o.rewards && + pagination == o.pagination + 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 + [rewards, pagination].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) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{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[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._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 f010e88..2bebfc9 100644 --- a/lib/mx-platform-ruby/version.rb +++ b/lib/mx-platform-ruby/version.rb @@ -11,5 +11,5 @@ =end module MxPlatformRuby - VERSION = '0.37.0' + VERSION = '0.38.0' end diff --git a/openapi/config.yml b/openapi/config.yml index e2d6e6f..f9a3623 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.37.0 +gemVersion: 0.38.0 library: faraday moduleName: MxPlatformRuby diff --git a/spec/api/mx_platform_api_spec.rb b/spec/api/mx_platform_api_spec.rb index 3686592..f16f395 100644 --- a/spec/api/mx_platform_api_spec.rb +++ b/spec/api/mx_platform_api_spec.rb @@ -190,6 +190,18 @@ end end + # unit tests for credit_card + # Read a Credit Card Product + # This endpoint returns the specified `credit_card_product` according to the unique GUID. + # @param credit_card_product_guid The required `credit_card_product_guid` can be found on the `account` object. + # @param [Hash] opts the optional parameters + # @return [CreditCardProductResponse] + describe 'credit_card test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for delete_category # Delete category # Use this endpoint to delete a specific custom category according to its unique GUID. The API will respond with an empty object and a status of `204 No Content`. @@ -387,6 +399,19 @@ end end + # unit tests for fetch_rewards + # Fetch Rewards + # Calling this endpoint initiates an aggregation-type event which will gather the member's rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations. + # @param user_guid The unique id for a `user`. + # @param member_guid The unique identifier for the member. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [MemberResponseBody] + describe 'fetch_rewards test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for fetch_statements # Fetch statements # Use this endpoint to fetch the statements associated with a particular member. @@ -738,6 +763,19 @@ end end + # unit tests for list_rewards + # List Rewards + # Use this endpoint to list all the `rewards` associated with a specified `member`. + # @param user_guid The unique id for a `user`. + # @param member_guid The unique identifier for the member. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [RewardsResponseBody] + describe 'list_rewards test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for list_statements_by_member # List statements by member # Use this endpoint to get an array of available statements. @@ -1078,6 +1116,20 @@ end end + # unit tests for read_rewards + # Read Reward + # Use this endpoint to read a specific `reward` based on its unique GUID.. + # @param user_guid The unique id for a `user`. + # @param member_guid The unique identifier for the member. Defined by MX. + # @param reward_guid The unique identifier for the rewards. Defined by MX. + # @param [Hash] opts the optional parameters + # @return [RewardResponseBody] + describe 'read_rewards test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for read_statement_by_member # Read statement by member # Use this endpoint to read a JSON representation of the statement. diff --git a/spec/models/credit_card_product_response_spec.rb b/spec/models/credit_card_product_response_spec.rb new file mode 100644 index 0000000..3b7a587 --- /dev/null +++ b/spec/models/credit_card_product_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: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::CreditCardProductResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::CreditCardProductResponse do + let(:instance) { MxPlatformRuby::CreditCardProductResponse.new } + + describe 'test an instance of CreditCardProductResponse' do + it 'should create an instance of CreditCardProductResponse' do + expect(instance).to be_instance_of(MxPlatformRuby::CreditCardProductResponse) + end + end + describe 'test attribute "reward"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/credit_card_product_spec.rb b/spec/models/credit_card_product_spec.rb new file mode 100644 index 0000000..fb84847 --- /dev/null +++ b/spec/models/credit_card_product_spec.rb @@ -0,0 +1,112 @@ +=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: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::CreditCardProduct +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::CreditCardProduct do + let(:instance) { MxPlatformRuby::CreditCardProduct.new } + + describe 'test an instance of CreditCardProduct' do + it 'should create an instance of CreditCardProduct' do + expect(instance).to be_instance_of(MxPlatformRuby::CreditCardProduct) + end + end + describe 'test attribute "annual_fee"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "duration_of_introductory_rate_on_balance_transfer"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "duration_of_introductory_rate_on_purchases"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_cashback_rewards"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_other_rewards"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_travel_rewards"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_zero_introductory_annual_fee"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_zero_percent_introductory_rate"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_zero_percent_introductory_rate_on_balance_transfer"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "financial_institution"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_accepting_applications"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_small_business_card"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/reward_response_body_spec.rb b/spec/models/reward_response_body_spec.rb new file mode 100644 index 0000000..d2e8572 --- /dev/null +++ b/spec/models/reward_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: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::RewardResponseBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::RewardResponseBody do + let(:instance) { MxPlatformRuby::RewardResponseBody.new } + + describe 'test an instance of RewardResponseBody' do + it 'should create an instance of RewardResponseBody' do + expect(instance).to be_instance_of(MxPlatformRuby::RewardResponseBody) + end + end + describe 'test attribute "reward"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/reward_response_spec.rb b/spec/models/reward_response_spec.rb new file mode 100644 index 0000000..6baca29 --- /dev/null +++ b/spec/models/reward_response_spec.rb @@ -0,0 +1,88 @@ +=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: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::RewardResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::RewardResponse do + let(:instance) { MxPlatformRuby::RewardResponse.new } + + describe 'test an instance of RewardResponse' do + it 'should create an instance of RewardResponse' do + expect(instance).to be_instance_of(MxPlatformRuby::RewardResponse) + end + end + describe 'test attribute "account_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "balance_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "balance"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "expires_on"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "member_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "unit_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/rewards_response_body_spec.rb b/spec/models/rewards_response_body_spec.rb new file mode 100644 index 0000000..d957586 --- /dev/null +++ b/spec/models/rewards_response_body_spec.rb @@ -0,0 +1,40 @@ +=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: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::RewardsResponseBody +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::RewardsResponseBody do + let(:instance) { MxPlatformRuby::RewardsResponseBody.new } + + describe 'test an instance of RewardsResponseBody' do + it 'should create an instance of RewardsResponseBody' do + expect(instance).to be_instance_of(MxPlatformRuby::RewardsResponseBody) + end + end + describe 'test attribute "rewards"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "pagination"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/rewards_response_spec.rb b/spec/models/rewards_response_spec.rb new file mode 100644 index 0000000..625f646 --- /dev/null +++ b/spec/models/rewards_response_spec.rb @@ -0,0 +1,88 @@ +=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: 7.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MxPlatformRuby::RewardsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MxPlatformRuby::RewardsResponse do + let(:instance) { MxPlatformRuby::RewardsResponse.new } + + describe 'test an instance of RewardsResponse' do + it 'should create an instance of RewardsResponse' do + expect(instance).to be_instance_of(MxPlatformRuby::RewardsResponse) + end + end + describe 'test attribute "account_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "balance_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "balance"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "expires_on"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "member_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "unit_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_guid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end