mx-platform-ruby 0.37.0 → 0.39.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/docs/AccountResponse.md +2 -0
- data/docs/CreditCardProduct.md +44 -0
- data/docs/CreditCardProductResponse.md +18 -0
- data/docs/MxPlatformApi.md +292 -0
- data/docs/RewardResponse.md +36 -0
- data/docs/RewardResponseBody.md +18 -0
- data/docs/RewardsResponse.md +36 -0
- data/docs/RewardsResponseBody.md +20 -0
- data/lib/mx-platform-ruby/api/mx_platform_api.rb +276 -0
- data/lib/mx-platform-ruby/models/account_response.rb +11 -1
- data/lib/mx-platform-ruby/models/credit_card_product.rb +335 -0
- data/lib/mx-platform-ruby/models/credit_card_product_response.rb +214 -0
- data/lib/mx-platform-ruby/models/reward_response.rb +295 -0
- data/lib/mx-platform-ruby/models/reward_response_body.rb +214 -0
- data/lib/mx-platform-ruby/models/rewards_response.rb +295 -0
- data/lib/mx-platform-ruby/models/rewards_response_body.rb +225 -0
- data/lib/mx-platform-ruby/version.rb +1 -1
- data/lib/mx-platform-ruby.rb +6 -0
- data/openapi/config.yml +1 -1
- data/spec/api/mx_platform_api_spec.rb +52 -0
- data/spec/models/account_response_spec.rb +6 -0
- data/spec/models/credit_card_product_response_spec.rb +34 -0
- data/spec/models/credit_card_product_spec.rb +112 -0
- data/spec/models/reward_response_body_spec.rb +34 -0
- data/spec/models/reward_response_spec.rb +88 -0
- data/spec/models/rewards_response_body_spec.rb +40 -0
- data/spec/models/rewards_response_spec.rb +88 -0
- metadata +144 -120
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e61add8014e4af8eddee3d7ecff72bb5cbfa5181e92e3e21a056adb4fb0d6c79
|
4
|
+
data.tar.gz: 4bc80c1a991ac8766bbb826733a6cfdfc71076c8c50f795d54591ed5f623614b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba096840fc12b092ab449afb51d8a74f4d999e9781725192149cf006c8a7fd3fb69e86612f4ff7ead4e025f1b61f2bf503fc6522c0012dfedaec401bb8b1132f
|
7
|
+
data.tar.gz: 991548fa8e30d1a434bd67de2e3ab4c8fdeb7a8e8ce96c0ca19b1ee3482ab91e182a9044face58c8dab0aa0e210bfe30d8fe03d0e37f87339c6cfd8a3f2b5ebb
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mx-platform-ruby (0.
|
4
|
+
mx-platform-ruby (0.39.0)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-multipart
|
7
7
|
|
@@ -24,7 +24,7 @@ GEM
|
|
24
24
|
method_source (1.1.0)
|
25
25
|
multipart-post (2.4.1)
|
26
26
|
parallel (1.24.0)
|
27
|
-
parser (3.3.4.
|
27
|
+
parser (3.3.4.2)
|
28
28
|
ast (~> 2.4.1)
|
29
29
|
racc
|
30
30
|
pry (0.13.1)
|
@@ -35,7 +35,7 @@ GEM
|
|
35
35
|
pry (~> 0.13.0)
|
36
36
|
psych (5.1.2)
|
37
37
|
stringio
|
38
|
-
racc (1.8.
|
38
|
+
racc (1.8.1)
|
39
39
|
rainbow (3.1.1)
|
40
40
|
rake (13.0.6)
|
41
41
|
rspec (3.13.0)
|
data/docs/AccountResponse.md
CHANGED
@@ -52,6 +52,7 @@
|
|
52
52
|
| **property_type** | **String** | | [optional] |
|
53
53
|
| **routing_number** | **String** | | [optional] |
|
54
54
|
| **started_on** | **String** | | [optional] |
|
55
|
+
| **statement_balance** | **Float** | | [optional] |
|
55
56
|
| **subtype** | **String** | | [optional] |
|
56
57
|
| **today_ugl_amount** | **Float** | | [optional] |
|
57
58
|
| **today_ugl_percentage** | **Float** | | [optional] |
|
@@ -116,6 +117,7 @@ instance = MxPlatformRuby::AccountResponse.new(
|
|
116
117
|
property_type: VEHICLE,
|
117
118
|
routing_number: 68899990000000,
|
118
119
|
started_on: 2015-10-13T17:57:37.000Z,
|
120
|
+
statement_balance: 100.1,
|
119
121
|
subtype: NONE,
|
120
122
|
today_ugl_amount: 1000.5,
|
121
123
|
today_ugl_percentage: 6.9,
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# MxPlatformRuby::CreditCardProduct
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **annual_fee** | **Object** | | [optional] |
|
8
|
+
| **duration_of_introductory_rate_on_balance_transfer** | **Object** | | [optional] |
|
9
|
+
| **duration_of_introductory_rate_on_purchases** | **Object** | | [optional] |
|
10
|
+
| **guid** | **Object** | | [optional] |
|
11
|
+
| **has_cashback_rewards** | **Boolean** | | [optional] |
|
12
|
+
| **has_other_rewards** | **Boolean** | | [optional] |
|
13
|
+
| **has_travel_rewards** | **Boolean** | | [optional] |
|
14
|
+
| **has_zero_introductory_annual_fee** | **Boolean** | | [optional] |
|
15
|
+
| **has_zero_percent_introductory_rate** | **Boolean** | | [optional] |
|
16
|
+
| **has_zero_percent_introductory_rate_on_balance_transfer** | **Boolean** | | [optional] |
|
17
|
+
| **financial_institution** | **Boolean** | | [optional] |
|
18
|
+
| **is_accepting_applications** | **Boolean** | | [optional] |
|
19
|
+
| **is_small_business_card** | **Boolean** | | [optional] |
|
20
|
+
| **name** | **String** | | [optional] |
|
21
|
+
|
22
|
+
## Example
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'mx-platform-ruby'
|
26
|
+
|
27
|
+
instance = MxPlatformRuby::CreditCardProduct.new(
|
28
|
+
annual_fee: 45.0,
|
29
|
+
duration_of_introductory_rate_on_balance_transfer: null,
|
30
|
+
duration_of_introductory_rate_on_purchases: null,
|
31
|
+
guid: CCA-b5bcd822-6d01-4e23-b8d6-846a225e714a,
|
32
|
+
has_cashback_rewards: false,
|
33
|
+
has_other_rewards: true,
|
34
|
+
has_travel_rewards: true,
|
35
|
+
has_zero_introductory_annual_fee: true,
|
36
|
+
has_zero_percent_introductory_rate: false,
|
37
|
+
has_zero_percent_introductory_rate_on_balance_transfer: true,
|
38
|
+
financial_institution: true,
|
39
|
+
is_accepting_applications: true,
|
40
|
+
is_small_business_card: true,
|
41
|
+
name: Chase Credit Card
|
42
|
+
)
|
43
|
+
```
|
44
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# MxPlatformRuby::CreditCardProductResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **reward** | [**CreditCardProduct**](CreditCardProduct.md) | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'mx-platform-ruby'
|
13
|
+
|
14
|
+
instance = MxPlatformRuby::CreditCardProductResponse.new(
|
15
|
+
reward: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/MxPlatformApi.md
CHANGED
@@ -16,6 +16,7 @@ All URIs are relative to *https://api.mx.com*
|
|
16
16
|
| [**create_tagging**](MxPlatformApi.md#create_tagging) | **POST** /users/{user_guid}/taggings | Create tagging |
|
17
17
|
| [**create_transaction_rule**](MxPlatformApi.md#create_transaction_rule) | **POST** /users/{user_guid}/transaction_rules | Create transaction rule |
|
18
18
|
| [**create_user**](MxPlatformApi.md#create_user) | **POST** /users | Create user |
|
19
|
+
| [**credit_card**](MxPlatformApi.md#credit_card) | **GET** /credit_card_products/{credit_card_product_guid} | Read a Credit Card Product |
|
19
20
|
| [**delete_category**](MxPlatformApi.md#delete_category) | **DELETE** /users/{user_guid}/categories/{category_guid} | Delete category |
|
20
21
|
| [**delete_managed_account**](MxPlatformApi.md#delete_managed_account) | **DELETE** /users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid} | Delete managed account |
|
21
22
|
| [**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*
|
|
31
32
|
| [**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 |
|
32
33
|
| [**enhance_transactions**](MxPlatformApi.md#enhance_transactions) | **POST** /transactions/enhance | Enhance transactions |
|
33
34
|
| [**extend_history**](MxPlatformApi.md#extend_history) | **POST** /users/{user_guid}/members/{member_guid}/extend_history | Extend history |
|
35
|
+
| [**fetch_rewards**](MxPlatformApi.md#fetch_rewards) | **POST** /users/{user_guid}/members/{member_guid}/fetch_rewards | Fetch Rewards |
|
34
36
|
| [**fetch_statements**](MxPlatformApi.md#fetch_statements) | **POST** /users/{user_guid}/members/{member_guid}/fetch_statements | Fetch statements |
|
35
37
|
| [**fetch_tax_documents**](MxPlatformApi.md#fetch_tax_documents) | **POST** /users/{user_guid}/members/{member_guid}/fetch_tax_documents | Fetch Tax Documents |
|
36
38
|
| [**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*
|
|
55
57
|
| [**list_member_credentials**](MxPlatformApi.md#list_member_credentials) | **GET** /users/{user_guid}/members/{member_guid}/credentials | List member credentials |
|
56
58
|
| [**list_members**](MxPlatformApi.md#list_members) | **GET** /users/{user_guid}/members | List members |
|
57
59
|
| [**list_merchants**](MxPlatformApi.md#list_merchants) | **GET** /merchants | List merchants |
|
60
|
+
| [**list_rewards**](MxPlatformApi.md#list_rewards) | **GET** /users/{user_guid}/members/{member_guid}/rewards | List Rewards |
|
58
61
|
| [**list_statements_by_member**](MxPlatformApi.md#list_statements_by_member) | **GET** /users/{user_guid}/members/{member_guid}/statements | List statements by member |
|
59
62
|
| [**list_taggings**](MxPlatformApi.md#list_taggings) | **GET** /users/{user_guid}/taggings | List taggings |
|
60
63
|
| [**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*
|
|
79
82
|
| [**read_member_status**](MxPlatformApi.md#read_member_status) | **GET** /users/{user_guid}/members/{member_guid}/status | Read member status |
|
80
83
|
| [**read_merchant**](MxPlatformApi.md#read_merchant) | **GET** /merchants/{merchant_guid} | Read merchant |
|
81
84
|
| [**read_merchant_location**](MxPlatformApi.md#read_merchant_location) | **GET** /merchant_locations/{merchant_location_guid} | Read merchant location |
|
85
|
+
| [**read_rewards**](MxPlatformApi.md#read_rewards) | **GET** /users/{user_guid}/members/{member_guid}/rewards/{reward_guid} | Read Reward |
|
82
86
|
| [**read_statement_by_member**](MxPlatformApi.md#read_statement_by_member) | **GET** /users/{user_guid}/members/{member_guid}/statements/{statement_guid} | Read statement by member |
|
83
87
|
| [**read_tag**](MxPlatformApi.md#read_tag) | **GET** /users/{user_guid}/tags/{tag_guid} | Read tag |
|
84
88
|
| [**read_tagging**](MxPlatformApi.md#read_tagging) | **GET** /users/{user_guid}/taggings/{tagging_guid} | Read tagging |
|
@@ -973,6 +977,76 @@ end
|
|
973
977
|
- **Accept**: application/vnd.mx.api.v1+json
|
974
978
|
|
975
979
|
|
980
|
+
## credit_card
|
981
|
+
|
982
|
+
> <CreditCardProductResponse> credit_card(credit_card_product_guid)
|
983
|
+
|
984
|
+
Read a Credit Card Product
|
985
|
+
|
986
|
+
This endpoint returns the specified `credit_card_product` according to the unique GUID.
|
987
|
+
|
988
|
+
### Examples
|
989
|
+
|
990
|
+
```ruby
|
991
|
+
require 'time'
|
992
|
+
require 'mx-platform-ruby'
|
993
|
+
# setup authorization
|
994
|
+
MxPlatformRuby.configure do |config|
|
995
|
+
# Configure HTTP basic authorization: basicAuth
|
996
|
+
config.username = 'YOUR USERNAME'
|
997
|
+
config.password = 'YOUR PASSWORD'
|
998
|
+
end
|
999
|
+
|
1000
|
+
api_instance = MxPlatformRuby::MxPlatformApi.new
|
1001
|
+
credit_card_product_guid = 'credit_card_product_guid' # String | The required `credit_card_product_guid` can be found on the `account` object.
|
1002
|
+
|
1003
|
+
begin
|
1004
|
+
# Read a Credit Card Product
|
1005
|
+
result = api_instance.credit_card(credit_card_product_guid)
|
1006
|
+
p result
|
1007
|
+
rescue MxPlatformRuby::ApiError => e
|
1008
|
+
puts "Error when calling MxPlatformApi->credit_card: #{e}"
|
1009
|
+
end
|
1010
|
+
```
|
1011
|
+
|
1012
|
+
#### Using the credit_card_with_http_info variant
|
1013
|
+
|
1014
|
+
This returns an Array which contains the response data, status code and headers.
|
1015
|
+
|
1016
|
+
> <Array(<CreditCardProductResponse>, Integer, Hash)> credit_card_with_http_info(credit_card_product_guid)
|
1017
|
+
|
1018
|
+
```ruby
|
1019
|
+
begin
|
1020
|
+
# Read a Credit Card Product
|
1021
|
+
data, status_code, headers = api_instance.credit_card_with_http_info(credit_card_product_guid)
|
1022
|
+
p status_code # => 2xx
|
1023
|
+
p headers # => { ... }
|
1024
|
+
p data # => <CreditCardProductResponse>
|
1025
|
+
rescue MxPlatformRuby::ApiError => e
|
1026
|
+
puts "Error when calling MxPlatformApi->credit_card_with_http_info: #{e}"
|
1027
|
+
end
|
1028
|
+
```
|
1029
|
+
|
1030
|
+
### Parameters
|
1031
|
+
|
1032
|
+
| Name | Type | Description | Notes |
|
1033
|
+
| ---- | ---- | ----------- | ----- |
|
1034
|
+
| **credit_card_product_guid** | **String** | The required `credit_card_product_guid` can be found on the `account` object. | |
|
1035
|
+
|
1036
|
+
### Return type
|
1037
|
+
|
1038
|
+
[**CreditCardProductResponse**](CreditCardProductResponse.md)
|
1039
|
+
|
1040
|
+
### Authorization
|
1041
|
+
|
1042
|
+
[basicAuth](../README.md#basicAuth)
|
1043
|
+
|
1044
|
+
### HTTP request headers
|
1045
|
+
|
1046
|
+
- **Content-Type**: Not defined
|
1047
|
+
- **Accept**: application/vnd.mx.api.v1+json
|
1048
|
+
|
1049
|
+
|
976
1050
|
## delete_category
|
977
1051
|
|
978
1052
|
> delete_category(category_guid, user_guid)
|
@@ -2047,6 +2121,78 @@ end
|
|
2047
2121
|
- **Accept**: application/vnd.mx.api.v1+json
|
2048
2122
|
|
2049
2123
|
|
2124
|
+
## fetch_rewards
|
2125
|
+
|
2126
|
+
> <MemberResponseBody> fetch_rewards(user_guid, member_guid)
|
2127
|
+
|
2128
|
+
Fetch Rewards
|
2129
|
+
|
2130
|
+
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.
|
2131
|
+
|
2132
|
+
### Examples
|
2133
|
+
|
2134
|
+
```ruby
|
2135
|
+
require 'time'
|
2136
|
+
require 'mx-platform-ruby'
|
2137
|
+
# setup authorization
|
2138
|
+
MxPlatformRuby.configure do |config|
|
2139
|
+
# Configure HTTP basic authorization: basicAuth
|
2140
|
+
config.username = 'YOUR USERNAME'
|
2141
|
+
config.password = 'YOUR PASSWORD'
|
2142
|
+
end
|
2143
|
+
|
2144
|
+
api_instance = MxPlatformRuby::MxPlatformApi.new
|
2145
|
+
user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`.
|
2146
|
+
member_guid = 'MBR-fa7537f3-48aa-a683-a02a-b18345562f54' # String | The unique identifier for the member. Defined by MX.
|
2147
|
+
|
2148
|
+
begin
|
2149
|
+
# Fetch Rewards
|
2150
|
+
result = api_instance.fetch_rewards(user_guid, member_guid)
|
2151
|
+
p result
|
2152
|
+
rescue MxPlatformRuby::ApiError => e
|
2153
|
+
puts "Error when calling MxPlatformApi->fetch_rewards: #{e}"
|
2154
|
+
end
|
2155
|
+
```
|
2156
|
+
|
2157
|
+
#### Using the fetch_rewards_with_http_info variant
|
2158
|
+
|
2159
|
+
This returns an Array which contains the response data, status code and headers.
|
2160
|
+
|
2161
|
+
> <Array(<MemberResponseBody>, Integer, Hash)> fetch_rewards_with_http_info(user_guid, member_guid)
|
2162
|
+
|
2163
|
+
```ruby
|
2164
|
+
begin
|
2165
|
+
# Fetch Rewards
|
2166
|
+
data, status_code, headers = api_instance.fetch_rewards_with_http_info(user_guid, member_guid)
|
2167
|
+
p status_code # => 2xx
|
2168
|
+
p headers # => { ... }
|
2169
|
+
p data # => <MemberResponseBody>
|
2170
|
+
rescue MxPlatformRuby::ApiError => e
|
2171
|
+
puts "Error when calling MxPlatformApi->fetch_rewards_with_http_info: #{e}"
|
2172
|
+
end
|
2173
|
+
```
|
2174
|
+
|
2175
|
+
### Parameters
|
2176
|
+
|
2177
|
+
| Name | Type | Description | Notes |
|
2178
|
+
| ---- | ---- | ----------- | ----- |
|
2179
|
+
| **user_guid** | **String** | The unique id for a `user`. | |
|
2180
|
+
| **member_guid** | **String** | The unique identifier for the member. Defined by MX. | |
|
2181
|
+
|
2182
|
+
### Return type
|
2183
|
+
|
2184
|
+
[**MemberResponseBody**](MemberResponseBody.md)
|
2185
|
+
|
2186
|
+
### Authorization
|
2187
|
+
|
2188
|
+
[basicAuth](../README.md#basicAuth)
|
2189
|
+
|
2190
|
+
### HTTP request headers
|
2191
|
+
|
2192
|
+
- **Content-Type**: Not defined
|
2193
|
+
- **Accept**: application/vnd.mx.api.v1+json
|
2194
|
+
|
2195
|
+
|
2050
2196
|
## fetch_statements
|
2051
2197
|
|
2052
2198
|
> <MemberResponseBody> fetch_statements(member_guid, user_guid)
|
@@ -3895,6 +4041,78 @@ end
|
|
3895
4041
|
- **Accept**: application/vnd.mx.api.v1+json
|
3896
4042
|
|
3897
4043
|
|
4044
|
+
## list_rewards
|
4045
|
+
|
4046
|
+
> <RewardsResponseBody> list_rewards(user_guid, member_guid)
|
4047
|
+
|
4048
|
+
List Rewards
|
4049
|
+
|
4050
|
+
Use this endpoint to list all the `rewards` associated with a specified `member`.
|
4051
|
+
|
4052
|
+
### Examples
|
4053
|
+
|
4054
|
+
```ruby
|
4055
|
+
require 'time'
|
4056
|
+
require 'mx-platform-ruby'
|
4057
|
+
# setup authorization
|
4058
|
+
MxPlatformRuby.configure do |config|
|
4059
|
+
# Configure HTTP basic authorization: basicAuth
|
4060
|
+
config.username = 'YOUR USERNAME'
|
4061
|
+
config.password = 'YOUR PASSWORD'
|
4062
|
+
end
|
4063
|
+
|
4064
|
+
api_instance = MxPlatformRuby::MxPlatformApi.new
|
4065
|
+
user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`.
|
4066
|
+
member_guid = 'MBR-fa7537f3-48aa-a683-a02a-b18345562f54' # String | The unique identifier for the member. Defined by MX.
|
4067
|
+
|
4068
|
+
begin
|
4069
|
+
# List Rewards
|
4070
|
+
result = api_instance.list_rewards(user_guid, member_guid)
|
4071
|
+
p result
|
4072
|
+
rescue MxPlatformRuby::ApiError => e
|
4073
|
+
puts "Error when calling MxPlatformApi->list_rewards: #{e}"
|
4074
|
+
end
|
4075
|
+
```
|
4076
|
+
|
4077
|
+
#### Using the list_rewards_with_http_info variant
|
4078
|
+
|
4079
|
+
This returns an Array which contains the response data, status code and headers.
|
4080
|
+
|
4081
|
+
> <Array(<RewardsResponseBody>, Integer, Hash)> list_rewards_with_http_info(user_guid, member_guid)
|
4082
|
+
|
4083
|
+
```ruby
|
4084
|
+
begin
|
4085
|
+
# List Rewards
|
4086
|
+
data, status_code, headers = api_instance.list_rewards_with_http_info(user_guid, member_guid)
|
4087
|
+
p status_code # => 2xx
|
4088
|
+
p headers # => { ... }
|
4089
|
+
p data # => <RewardsResponseBody>
|
4090
|
+
rescue MxPlatformRuby::ApiError => e
|
4091
|
+
puts "Error when calling MxPlatformApi->list_rewards_with_http_info: #{e}"
|
4092
|
+
end
|
4093
|
+
```
|
4094
|
+
|
4095
|
+
### Parameters
|
4096
|
+
|
4097
|
+
| Name | Type | Description | Notes |
|
4098
|
+
| ---- | ---- | ----------- | ----- |
|
4099
|
+
| **user_guid** | **String** | The unique id for a `user`. | |
|
4100
|
+
| **member_guid** | **String** | The unique identifier for the member. Defined by MX. | |
|
4101
|
+
|
4102
|
+
### Return type
|
4103
|
+
|
4104
|
+
[**RewardsResponseBody**](RewardsResponseBody.md)
|
4105
|
+
|
4106
|
+
### Authorization
|
4107
|
+
|
4108
|
+
[basicAuth](../README.md#basicAuth)
|
4109
|
+
|
4110
|
+
### HTTP request headers
|
4111
|
+
|
4112
|
+
- **Content-Type**: Not defined
|
4113
|
+
- **Accept**: application/vnd.mx.api.v1+json
|
4114
|
+
|
4115
|
+
|
3898
4116
|
## list_statements_by_member
|
3899
4117
|
|
3900
4118
|
> <StatementsResponseBody> list_statements_by_member(member_guid, user_guid, opts)
|
@@ -5701,6 +5919,80 @@ end
|
|
5701
5919
|
- **Accept**: application/vnd.mx.api.v1+json
|
5702
5920
|
|
5703
5921
|
|
5922
|
+
## read_rewards
|
5923
|
+
|
5924
|
+
> <RewardResponseBody> read_rewards(user_guid, member_guid, reward_guid)
|
5925
|
+
|
5926
|
+
Read Reward
|
5927
|
+
|
5928
|
+
Use this endpoint to read a specific `reward` based on its unique GUID..
|
5929
|
+
|
5930
|
+
### Examples
|
5931
|
+
|
5932
|
+
```ruby
|
5933
|
+
require 'time'
|
5934
|
+
require 'mx-platform-ruby'
|
5935
|
+
# setup authorization
|
5936
|
+
MxPlatformRuby.configure do |config|
|
5937
|
+
# Configure HTTP basic authorization: basicAuth
|
5938
|
+
config.username = 'YOUR USERNAME'
|
5939
|
+
config.password = 'YOUR PASSWORD'
|
5940
|
+
end
|
5941
|
+
|
5942
|
+
api_instance = MxPlatformRuby::MxPlatformApi.new
|
5943
|
+
user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`.
|
5944
|
+
member_guid = 'MBR-fa7537f3-48aa-a683-a02a-b18345562f54' # String | The unique identifier for the member. Defined by MX.
|
5945
|
+
reward_guid = 'RWD-fa7537f3-48aa-a683-a02a-b324322f54' # String | The unique identifier for the rewards. Defined by MX.
|
5946
|
+
|
5947
|
+
begin
|
5948
|
+
# Read Reward
|
5949
|
+
result = api_instance.read_rewards(user_guid, member_guid, reward_guid)
|
5950
|
+
p result
|
5951
|
+
rescue MxPlatformRuby::ApiError => e
|
5952
|
+
puts "Error when calling MxPlatformApi->read_rewards: #{e}"
|
5953
|
+
end
|
5954
|
+
```
|
5955
|
+
|
5956
|
+
#### Using the read_rewards_with_http_info variant
|
5957
|
+
|
5958
|
+
This returns an Array which contains the response data, status code and headers.
|
5959
|
+
|
5960
|
+
> <Array(<RewardResponseBody>, Integer, Hash)> read_rewards_with_http_info(user_guid, member_guid, reward_guid)
|
5961
|
+
|
5962
|
+
```ruby
|
5963
|
+
begin
|
5964
|
+
# Read Reward
|
5965
|
+
data, status_code, headers = api_instance.read_rewards_with_http_info(user_guid, member_guid, reward_guid)
|
5966
|
+
p status_code # => 2xx
|
5967
|
+
p headers # => { ... }
|
5968
|
+
p data # => <RewardResponseBody>
|
5969
|
+
rescue MxPlatformRuby::ApiError => e
|
5970
|
+
puts "Error when calling MxPlatformApi->read_rewards_with_http_info: #{e}"
|
5971
|
+
end
|
5972
|
+
```
|
5973
|
+
|
5974
|
+
### Parameters
|
5975
|
+
|
5976
|
+
| Name | Type | Description | Notes |
|
5977
|
+
| ---- | ---- | ----------- | ----- |
|
5978
|
+
| **user_guid** | **String** | The unique id for a `user`. | |
|
5979
|
+
| **member_guid** | **String** | The unique identifier for the member. Defined by MX. | |
|
5980
|
+
| **reward_guid** | **String** | The unique identifier for the rewards. Defined by MX. | |
|
5981
|
+
|
5982
|
+
### Return type
|
5983
|
+
|
5984
|
+
[**RewardResponseBody**](RewardResponseBody.md)
|
5985
|
+
|
5986
|
+
### Authorization
|
5987
|
+
|
5988
|
+
[basicAuth](../README.md#basicAuth)
|
5989
|
+
|
5990
|
+
### HTTP request headers
|
5991
|
+
|
5992
|
+
- **Content-Type**: Not defined
|
5993
|
+
- **Accept**: application/vnd.mx.api.v1+json
|
5994
|
+
|
5995
|
+
|
5704
5996
|
## read_statement_by_member
|
5705
5997
|
|
5706
5998
|
> <StatementResponseBody> read_statement_by_member(member_guid, statement_guid, user_guid)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# MxPlatformRuby::RewardResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **account_guid** | **String** | | [optional] |
|
8
|
+
| **balance_type** | **String** | | [optional] |
|
9
|
+
| **balance** | **Integer** | | [optional] |
|
10
|
+
| **created_at** | **String** | | [optional] |
|
11
|
+
| **description** | **String** | | [optional] |
|
12
|
+
| **expires_on** | **String** | | [optional] |
|
13
|
+
| **guid** | **String** | | [optional] |
|
14
|
+
| **member_guid** | **String** | | [optional] |
|
15
|
+
| **unit_type** | **String** | | [optional] |
|
16
|
+
| **user_guid** | **String** | | [optional] |
|
17
|
+
|
18
|
+
## Example
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'mx-platform-ruby'
|
22
|
+
|
23
|
+
instance = MxPlatformRuby::RewardResponse.new(
|
24
|
+
account_guid: ACT-1234,
|
25
|
+
balance_type: EXPIRING_BALANCE,
|
26
|
+
balance: 102,
|
27
|
+
created_at: 2020-01-28T21:09:01+0000,
|
28
|
+
description: A description of the reward.,
|
29
|
+
expires_on: 2020-02-28,
|
30
|
+
guid: RWD-1234,
|
31
|
+
member_guid: MBR-4567,
|
32
|
+
unit_type: POINTS,
|
33
|
+
user_guid: USR-1234
|
34
|
+
)
|
35
|
+
```
|
36
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# MxPlatformRuby::RewardResponseBody
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **reward** | [**RewardResponse**](RewardResponse.md) | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'mx-platform-ruby'
|
13
|
+
|
14
|
+
instance = MxPlatformRuby::RewardResponseBody.new(
|
15
|
+
reward: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# MxPlatformRuby::RewardsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **account_guid** | **String** | | [optional] |
|
8
|
+
| **balance_type** | **String** | | [optional] |
|
9
|
+
| **balance** | **Integer** | | [optional] |
|
10
|
+
| **created_at** | **String** | | [optional] |
|
11
|
+
| **description** | **String** | | [optional] |
|
12
|
+
| **expires_on** | **String** | | [optional] |
|
13
|
+
| **guid** | **String** | | [optional] |
|
14
|
+
| **member_guid** | **String** | | [optional] |
|
15
|
+
| **unit_type** | **String** | | [optional] |
|
16
|
+
| **user_guid** | **String** | | [optional] |
|
17
|
+
|
18
|
+
## Example
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'mx-platform-ruby'
|
22
|
+
|
23
|
+
instance = MxPlatformRuby::RewardsResponse.new(
|
24
|
+
account_guid: ACT-1234,
|
25
|
+
balance_type: EXPIRING_BALANCE,
|
26
|
+
balance: 102,
|
27
|
+
created_at: 2020-01-28T21:09:01+0000,
|
28
|
+
description: A description of the reward.,
|
29
|
+
expires_on: 2020-02-28,
|
30
|
+
guid: RWD-1234,
|
31
|
+
member_guid: MBR-4567,
|
32
|
+
unit_type: POINTS,
|
33
|
+
user_guid: USR-1234
|
34
|
+
)
|
35
|
+
```
|
36
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# MxPlatformRuby::RewardsResponseBody
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **rewards** | [**Array<RewardsResponse>**](RewardsResponse.md) | | [optional] |
|
8
|
+
| **pagination** | [**PaginationResponse**](PaginationResponse.md) | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'mx-platform-ruby'
|
14
|
+
|
15
|
+
instance = MxPlatformRuby::RewardsResponseBody.new(
|
16
|
+
rewards: null,
|
17
|
+
pagination: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|