Skip to content

Commit

Permalink
Add credit card product and rewards beta endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
brettmortensen committed Feb 14, 2020
1 parent c587646 commit 349ad63
Show file tree
Hide file tree
Showing 10 changed files with 796 additions and 1 deletion.
574 changes: 574 additions & 0 deletions atrium.ts

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/Account.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ Name | Type | Description | Notes
**cashBalance** | **number** | | [optional]
**cashSurrenderValue** | **number** | | [optional]
**createdAt** | **string** | | [optional]
**creditCardProductGuid** | **string** | | [optional]
**creditLimit** | **number** | | [optional]
**currencyCode** | **string** | | [optional]
**currentRewardLevel** | **string** | | [optional]
**dayPaymentIsDue** | **number** | | [optional]
**deathBenefit** | **number** | | [optional]
**enrolledInRewardsOn** | **string** | | [optional]
**guid** | **string** | | [optional]
**holdingsValue** | **number** | | [optional]
**institutionCode** | **string** | | [optional]
Expand All @@ -28,9 +31,11 @@ Name | Type | Description | Notes
**minimumBalance** | **number** | | [optional]
**minimumPayment** | **number** | | [optional]
**name** | **string** | | [optional]
**nextRewardLevel** | **string** | | [optional]
**originalBalance** | **number** | | [optional]
**paymentDueAt** | **string** | | [optional]
**payoffBalance** | **number** | | [optional]
**primaryRewardUnit** | **string** | | [optional]
**startedOn** | **string** | | [optional]
**subtype** | **string** | | [optional]
**totalAccountValue** | **number** | | [optional]
Expand Down
14 changes: 14 additions & 0 deletions docs/CreditCardProduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# CreditCardProduct

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**guid** | **string** | | [optional]
**name** | **string** | | [optional]
**annualFee** | **number** | | [optional]
**hasCashbackRewards** | **boolean** | | [optional]
**hasTravelRewards** | **boolean** | | [optional]
**isSmallBusinessCard** | **boolean** | | [optional]
**hasZeroPercentIntroductoryRate** | **boolean** | | [optional]


8 changes: 8 additions & 0 deletions docs/CreditCardProductResponseBody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CreditCardProductResponseBody

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**creditCardProduct** | [**CreditCardProduct**](CreditCardProduct.md) | | [optional]


41 changes: 41 additions & 0 deletions docs/CreditCardProductsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# .CreditCardProductsApi

Method | HTTP request | Description
------------- | ------------- | -------------
[**readCreditCardProduct**](CreditCardProductsApi.md#readCreditCardProduct) | **GET** /credit_card_products/{credit_card_product_guid} | Read credit card product


# **readCreditCardProduct**
> CreditCardProductResponseBody readCreditCardProduct(creditCardProductGuid)
Read credit card product

Use this endpoint to read the attributes of a credit card product.

### Example
```javascript
var atrium = require('./atrium.js');

var client = new atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID", "https://vestibule.mx.com");

var creditCardProductGuid = "CCA-123"; // string | The unique identifier for a `credit card product`.

var response = client.creditCardProducts.readCreditCardProduct(creditCardProductGuid);

response.then(function(value) {
console.log(value);
});
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**creditCardProductGuid** | **string**| The unique identifier for a `credit card product`. |

### Return type

[**CreditCardProductResponseBody**](CreditCardProductResponseBody.md)

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

18 changes: 18 additions & 0 deletions docs/Reward.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Reward

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**accountGuid** | **string** | | [optional]
**balance** | **number** | | [optional]
**balanceType** | **string** | | [optional]
**createdAt** | **string** | | [optional]
**description** | **string** | | [optional]
**expiresOn** | **string** | | [optional]
**guid** | **string** | | [optional]
**memberGuid** | **string** | | [optional]
**unitType** | **string** | | [optional]
**updatedAt** | **string** | | [optional]
**userGuid** | **string** | | [optional]


8 changes: 8 additions & 0 deletions docs/RewardResponseBody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# RewardResponseBody

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**reward** | [**Reward**](Reward.md) | | [optional]


119 changes: 119 additions & 0 deletions docs/RewardsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# .RewardsApi

Method | HTTP request | Description
------------- | ------------- | -------------
[**fetchRewards**](RewardsApi.md#fetchRewards) | **POST** /users/{user_guid}/members/{member_guid}/fetch_rewards | Fetch rewards
[**listRewards**](RewardsApi.md#listRewards) | **GET** /users/{user_guid}/members/{member_guid}/rewards | List rewards
[**readReward**](RewardsApi.md#readReward) | **GET** /users/{user_guid}/members/{member_guid}/rewards/{reward_guid} | Read reward


# **fetchRewards**
> MemberResponseBody fetchRewards(memberGuid, userGuid)
Fetch rewards

The fetch rewards endpoint begins fetching rewards for a member.

### Example
```javascript
var atrium = require('./atrium.js');

var client = new atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID", "https://vestibule.mx.com");

var memberGuid = "MBR-123"; // string | The unique identifier for a `member`.
var userGuid = "USR-123"; // string | The unique identifier for a `user`.

var response = client.rewards.fetchRewards(memberGuid, userGuid);

response.then(function(value) {
console.log(value);
});
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**memberGuid** | **string**| The unique identifier for a `member`. |
**userGuid** | **string**| The unique identifier for a `user`. |

### Return type

[**MemberResponseBody**](MemberResponseBody.md)

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **listRewards**
> RewardsResponseBody listRewards(memberGuid, userGuid)
List rewards

List rewards for a given account.

### Example
```javascript
var atrium = require('./atrium.js');

var client = new atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID", "https://vestibule.mx.com");

var memberGuid = "MBR-123"; // string | The unique identifier for a `member`.
var userGuid = "USR-123"; // string | The unique identifier for a `user`.

var response = client.rewards.listRewards(memberGuid, userGuid);

response.then(function(value) {
console.log(value);
});
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**memberGuid** | **string**| The unique identifier for a `member`. |
**userGuid** | **string**| The unique identifier for a `user`. |

### Return type

[**RewardsResponseBody**](RewardsResponseBody.md)

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **readReward**
> RewardResponseBody readReward(memberGuid, rewardGuid, userGuid)
Read reward

Read a reward.

### Example
```javascript
var atrium = require('./atrium.js');

var client = new atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID", "https://vestibule.mx.com");

var memberGuid = "MBR-123"; // string | The unique identifier for a `member`.
var rewardGuid = "RWD-123"; // string | The unique identifier for a `reward`.
var userGuid = "USR-123"; // string | The unique identifier for a `user`.

var response = client.rewards.readReward(memberGuid, rewardGuid, userGuid);

response.then(function(value) {
console.log(value);
});
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**memberGuid** | **string**| The unique identifier for a `member`. |
**rewardGuid** | **string**| The unique identifier for a `reward`. |
**userGuid** | **string**| The unique identifier for a `user`. |

### Return type

[**RewardResponseBody**](RewardResponseBody.md)

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

8 changes: 8 additions & 0 deletions docs/RewardsResponseBody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# RewardsResponseBody

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**rewards** | [**Array<Reward>**](Reward.md) | | [optional]


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mx-atrium",
"version": "2.9.7",
"version": "2.9.7-beta.0",
"description": "NodeJS client for mx-atrium-node",
"repository": "mxenabled/mx-atrium-node",
"main": "atrium.js",
Expand Down

0 comments on commit 349ad63

Please sign in to comment.