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.
@@ -909,6 +909,69 @@ module MxPlatformRuby
909
909
  return data, status_code, headers
910
910
  end
911
911
 
912
+ # Read a Credit Card Product
913
+ # This endpoint returns the specified `credit_card_product` according to the unique GUID.
914
+ # @param credit_card_product_guid [String] The required `credit_card_product_guid` can be found on the `account` object.
915
+ # @param [Hash] opts the optional parameters
916
+ # @return [CreditCardProductResponse]
917
+ def credit_card(credit_card_product_guid, opts = {})
918
+ data, _status_code, _headers = credit_card_with_http_info(credit_card_product_guid, opts)
919
+ data
920
+ end
921
+
922
+ # Read a Credit Card Product
923
+ # This endpoint returns the specified `credit_card_product` according to the unique GUID.
924
+ # @param credit_card_product_guid [String] The required `credit_card_product_guid` can be found on the `account` object.
925
+ # @param [Hash] opts the optional parameters
926
+ # @return [Array<(CreditCardProductResponse, Integer, Hash)>] CreditCardProductResponse data, response status code and response headers
927
+ def credit_card_with_http_info(credit_card_product_guid, opts = {})
928
+ if @api_client.config.debugging
929
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.credit_card ...'
930
+ end
931
+ # verify the required parameter 'credit_card_product_guid' is set
932
+ if @api_client.config.client_side_validation && credit_card_product_guid.nil?
933
+ fail ArgumentError, "Missing the required parameter 'credit_card_product_guid' when calling MxPlatformApi.credit_card"
934
+ end
935
+ # resource path
936
+ local_var_path = '/credit_card_products/{credit_card_product_guid}'.sub('{' + 'credit_card_product_guid' + '}', CGI.escape(credit_card_product_guid.to_s))
937
+
938
+ # query parameters
939
+ query_params = opts[:query_params] || {}
940
+
941
+ # header parameters
942
+ header_params = opts[:header_params] || {}
943
+ # HTTP header 'Accept' (if needed)
944
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
945
+
946
+ # form parameters
947
+ form_params = opts[:form_params] || {}
948
+
949
+ # http body (model)
950
+ post_body = opts[:debug_body]
951
+
952
+ # return_type
953
+ return_type = opts[:debug_return_type] || 'CreditCardProductResponse'
954
+
955
+ # auth_names
956
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
957
+
958
+ new_options = opts.merge(
959
+ :operation => :"MxPlatformApi.credit_card",
960
+ :header_params => header_params,
961
+ :query_params => query_params,
962
+ :form_params => form_params,
963
+ :body => post_body,
964
+ :auth_names => auth_names,
965
+ :return_type => return_type
966
+ )
967
+
968
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
969
+ if @api_client.config.debugging
970
+ @api_client.config.logger.debug "API called: MxPlatformApi#credit_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
971
+ end
972
+ return data, status_code, headers
973
+ end
974
+
912
975
  # Delete category
913
976
  # 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`.
914
977
  # @param category_guid [String] The unique id for a &#x60;category&#x60;.
@@ -1946,6 +2009,75 @@ module MxPlatformRuby
1946
2009
  return data, status_code, headers
1947
2010
  end
1948
2011
 
2012
+ # Fetch Rewards
2013
+ # 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.
2014
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
2015
+ # @param member_guid [String] The unique identifier for the member. Defined by MX.
2016
+ # @param [Hash] opts the optional parameters
2017
+ # @return [MemberResponseBody]
2018
+ def fetch_rewards(user_guid, member_guid, opts = {})
2019
+ data, _status_code, _headers = fetch_rewards_with_http_info(user_guid, member_guid, opts)
2020
+ data
2021
+ end
2022
+
2023
+ # Fetch Rewards
2024
+ # Calling this endpoint initiates an aggregation-type event which will gather the member&#39;s rewards information, as well as account and transaction information. Rewards data is also gathered with daily background aggregations.
2025
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
2026
+ # @param member_guid [String] The unique identifier for the member. Defined by MX.
2027
+ # @param [Hash] opts the optional parameters
2028
+ # @return [Array<(MemberResponseBody, Integer, Hash)>] MemberResponseBody data, response status code and response headers
2029
+ def fetch_rewards_with_http_info(user_guid, member_guid, opts = {})
2030
+ if @api_client.config.debugging
2031
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.fetch_rewards ...'
2032
+ end
2033
+ # verify the required parameter 'user_guid' is set
2034
+ if @api_client.config.client_side_validation && user_guid.nil?
2035
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.fetch_rewards"
2036
+ end
2037
+ # verify the required parameter 'member_guid' is set
2038
+ if @api_client.config.client_side_validation && member_guid.nil?
2039
+ fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.fetch_rewards"
2040
+ end
2041
+ # resource path
2042
+ 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))
2043
+
2044
+ # query parameters
2045
+ query_params = opts[:query_params] || {}
2046
+
2047
+ # header parameters
2048
+ header_params = opts[:header_params] || {}
2049
+ # HTTP header 'Accept' (if needed)
2050
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
2051
+
2052
+ # form parameters
2053
+ form_params = opts[:form_params] || {}
2054
+
2055
+ # http body (model)
2056
+ post_body = opts[:debug_body]
2057
+
2058
+ # return_type
2059
+ return_type = opts[:debug_return_type] || 'MemberResponseBody'
2060
+
2061
+ # auth_names
2062
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
2063
+
2064
+ new_options = opts.merge(
2065
+ :operation => :"MxPlatformApi.fetch_rewards",
2066
+ :header_params => header_params,
2067
+ :query_params => query_params,
2068
+ :form_params => form_params,
2069
+ :body => post_body,
2070
+ :auth_names => auth_names,
2071
+ :return_type => return_type
2072
+ )
2073
+
2074
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2075
+ if @api_client.config.debugging
2076
+ @api_client.config.logger.debug "API called: MxPlatformApi#fetch_rewards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2077
+ end
2078
+ return data, status_code, headers
2079
+ end
2080
+
1949
2081
  # Fetch statements
1950
2082
  # Use this endpoint to fetch the statements associated with a particular member.
1951
2083
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
@@ -3674,6 +3806,75 @@ module MxPlatformRuby
3674
3806
  return data, status_code, headers
3675
3807
  end
3676
3808
 
3809
+ # List Rewards
3810
+ # Use this endpoint to list all the `rewards` associated with a specified `member`.
3811
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
3812
+ # @param member_guid [String] The unique identifier for the member. Defined by MX.
3813
+ # @param [Hash] opts the optional parameters
3814
+ # @return [RewardsResponseBody]
3815
+ def list_rewards(user_guid, member_guid, opts = {})
3816
+ data, _status_code, _headers = list_rewards_with_http_info(user_guid, member_guid, opts)
3817
+ data
3818
+ end
3819
+
3820
+ # List Rewards
3821
+ # Use this endpoint to list all the &#x60;rewards&#x60; associated with a specified &#x60;member&#x60;.
3822
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
3823
+ # @param member_guid [String] The unique identifier for the member. Defined by MX.
3824
+ # @param [Hash] opts the optional parameters
3825
+ # @return [Array<(RewardsResponseBody, Integer, Hash)>] RewardsResponseBody data, response status code and response headers
3826
+ def list_rewards_with_http_info(user_guid, member_guid, opts = {})
3827
+ if @api_client.config.debugging
3828
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.list_rewards ...'
3829
+ end
3830
+ # verify the required parameter 'user_guid' is set
3831
+ if @api_client.config.client_side_validation && user_guid.nil?
3832
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.list_rewards"
3833
+ end
3834
+ # verify the required parameter 'member_guid' is set
3835
+ if @api_client.config.client_side_validation && member_guid.nil?
3836
+ fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.list_rewards"
3837
+ end
3838
+ # resource path
3839
+ 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))
3840
+
3841
+ # query parameters
3842
+ query_params = opts[:query_params] || {}
3843
+
3844
+ # header parameters
3845
+ header_params = opts[:header_params] || {}
3846
+ # HTTP header 'Accept' (if needed)
3847
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
3848
+
3849
+ # form parameters
3850
+ form_params = opts[:form_params] || {}
3851
+
3852
+ # http body (model)
3853
+ post_body = opts[:debug_body]
3854
+
3855
+ # return_type
3856
+ return_type = opts[:debug_return_type] || 'RewardsResponseBody'
3857
+
3858
+ # auth_names
3859
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
3860
+
3861
+ new_options = opts.merge(
3862
+ :operation => :"MxPlatformApi.list_rewards",
3863
+ :header_params => header_params,
3864
+ :query_params => query_params,
3865
+ :form_params => form_params,
3866
+ :body => post_body,
3867
+ :auth_names => auth_names,
3868
+ :return_type => return_type
3869
+ )
3870
+
3871
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3872
+ if @api_client.config.debugging
3873
+ @api_client.config.logger.debug "API called: MxPlatformApi#list_rewards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3874
+ end
3875
+ return data, status_code, headers
3876
+ end
3877
+
3677
3878
  # List statements by member
3678
3879
  # Use this endpoint to get an array of available statements.
3679
3880
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
@@ -5393,6 +5594,81 @@ module MxPlatformRuby
5393
5594
  return data, status_code, headers
5394
5595
  end
5395
5596
 
5597
+ # Read Reward
5598
+ # Use this endpoint to read a specific `reward` based on its unique GUID..
5599
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5600
+ # @param member_guid [String] The unique identifier for the member. Defined by MX.
5601
+ # @param reward_guid [String] The unique identifier for the rewards. Defined by MX.
5602
+ # @param [Hash] opts the optional parameters
5603
+ # @return [RewardResponseBody]
5604
+ def read_rewards(user_guid, member_guid, reward_guid, opts = {})
5605
+ data, _status_code, _headers = read_rewards_with_http_info(user_guid, member_guid, reward_guid, opts)
5606
+ data
5607
+ end
5608
+
5609
+ # Read Reward
5610
+ # Use this endpoint to read a specific &#x60;reward&#x60; based on its unique GUID..
5611
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5612
+ # @param member_guid [String] The unique identifier for the member. Defined by MX.
5613
+ # @param reward_guid [String] The unique identifier for the rewards. Defined by MX.
5614
+ # @param [Hash] opts the optional parameters
5615
+ # @return [Array<(RewardResponseBody, Integer, Hash)>] RewardResponseBody data, response status code and response headers
5616
+ def read_rewards_with_http_info(user_guid, member_guid, reward_guid, opts = {})
5617
+ if @api_client.config.debugging
5618
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.read_rewards ...'
5619
+ end
5620
+ # verify the required parameter 'user_guid' is set
5621
+ if @api_client.config.client_side_validation && user_guid.nil?
5622
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.read_rewards"
5623
+ end
5624
+ # verify the required parameter 'member_guid' is set
5625
+ if @api_client.config.client_side_validation && member_guid.nil?
5626
+ fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.read_rewards"
5627
+ end
5628
+ # verify the required parameter 'reward_guid' is set
5629
+ if @api_client.config.client_side_validation && reward_guid.nil?
5630
+ fail ArgumentError, "Missing the required parameter 'reward_guid' when calling MxPlatformApi.read_rewards"
5631
+ end
5632
+ # resource path
5633
+ 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))
5634
+
5635
+ # query parameters
5636
+ query_params = opts[:query_params] || {}
5637
+
5638
+ # header parameters
5639
+ header_params = opts[:header_params] || {}
5640
+ # HTTP header 'Accept' (if needed)
5641
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
5642
+
5643
+ # form parameters
5644
+ form_params = opts[:form_params] || {}
5645
+
5646
+ # http body (model)
5647
+ post_body = opts[:debug_body]
5648
+
5649
+ # return_type
5650
+ return_type = opts[:debug_return_type] || 'RewardResponseBody'
5651
+
5652
+ # auth_names
5653
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
5654
+
5655
+ new_options = opts.merge(
5656
+ :operation => :"MxPlatformApi.read_rewards",
5657
+ :header_params => header_params,
5658
+ :query_params => query_params,
5659
+ :form_params => form_params,
5660
+ :body => post_body,
5661
+ :auth_names => auth_names,
5662
+ :return_type => return_type
5663
+ )
5664
+
5665
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
5666
+ if @api_client.config.debugging
5667
+ @api_client.config.logger.debug "API called: MxPlatformApi#read_rewards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5668
+ end
5669
+ return data, status_code, headers
5670
+ end
5671
+
5396
5672
  # Read statement by member
5397
5673
  # Use this endpoint to read a JSON representation of the statement.
5398
5674
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
@@ -111,6 +111,8 @@ module MxPlatformRuby
111
111
 
112
112
  attr_accessor :started_on
113
113
 
114
+ attr_accessor :statement_balance
115
+
114
116
  attr_accessor :subtype
115
117
 
116
118
  attr_accessor :today_ugl_amount
@@ -180,6 +182,7 @@ module MxPlatformRuby
180
182
  :'property_type' => :'property_type',
181
183
  :'routing_number' => :'routing_number',
182
184
  :'started_on' => :'started_on',
185
+ :'statement_balance' => :'statement_balance',
183
186
  :'subtype' => :'subtype',
184
187
  :'today_ugl_amount' => :'today_ugl_amount',
185
188
  :'today_ugl_percentage' => :'today_ugl_percentage',
@@ -248,6 +251,7 @@ module MxPlatformRuby
248
251
  :'property_type' => :'String',
249
252
  :'routing_number' => :'String',
250
253
  :'started_on' => :'String',
254
+ :'statement_balance' => :'Float',
251
255
  :'subtype' => :'String',
252
256
  :'today_ugl_amount' => :'Float',
253
257
  :'today_ugl_percentage' => :'Float',
@@ -310,6 +314,7 @@ module MxPlatformRuby
310
314
  :'property_type',
311
315
  :'routing_number',
312
316
  :'started_on',
317
+ :'statement_balance',
313
318
  :'subtype',
314
319
  :'today_ugl_amount',
315
320
  :'today_ugl_percentage',
@@ -529,6 +534,10 @@ module MxPlatformRuby
529
534
  self.started_on = attributes[:'started_on']
530
535
  end
531
536
 
537
+ if attributes.key?(:'statement_balance')
538
+ self.statement_balance = attributes[:'statement_balance']
539
+ end
540
+
532
541
  if attributes.key?(:'subtype')
533
542
  self.subtype = attributes[:'subtype']
534
543
  end
@@ -634,6 +643,7 @@ module MxPlatformRuby
634
643
  property_type == o.property_type &&
635
644
  routing_number == o.routing_number &&
636
645
  started_on == o.started_on &&
646
+ statement_balance == o.statement_balance &&
637
647
  subtype == o.subtype &&
638
648
  today_ugl_amount == o.today_ugl_amount &&
639
649
  today_ugl_percentage == o.today_ugl_percentage &&
@@ -654,7 +664,7 @@ module MxPlatformRuby
654
664
  # Calculates hash code according to all attributes.
655
665
  # @return [Integer] Hash code
656
666
  def hash
657
- [account_number, account_ownership, annuity_policy_to_date, annuity_provider, annuity_term_year, apr, apy, available_balance, available_credit, balance, cash_balance, cash_surrender_value, created_at, credit_limit, currency_code, day_payment_is_due, death_benefit, guid, holdings_value, id, imported_at, institution_code, insured_name, interest_rate, is_closed, is_hidden, is_manual, last_payment, last_payment_at, loan_amount, margin_balance, matures_on, member_guid, member_id, member_is_managed_by_user, metadata, minimum_balance, minimum_payment, name, nickname, original_balance, pay_out_amount, payment_due_at, payoff_balance, premium_amount, property_type, routing_number, started_on, subtype, today_ugl_amount, today_ugl_percentage, total_account_value, total_account_value_ugl, type, updated_at, user_guid, user_id].hash
667
+ [account_number, account_ownership, annuity_policy_to_date, annuity_provider, annuity_term_year, apr, apy, available_balance, available_credit, balance, cash_balance, cash_surrender_value, created_at, credit_limit, currency_code, day_payment_is_due, death_benefit, guid, holdings_value, id, imported_at, institution_code, insured_name, interest_rate, is_closed, is_hidden, is_manual, last_payment, last_payment_at, loan_amount, margin_balance, matures_on, member_guid, member_id, member_is_managed_by_user, metadata, minimum_balance, minimum_payment, name, nickname, original_balance, pay_out_amount, payment_due_at, payoff_balance, premium_amount, property_type, routing_number, started_on, statement_balance, subtype, today_ugl_amount, today_ugl_percentage, total_account_value, total_account_value_ugl, type, updated_at, user_guid, user_id].hash
658
668
  end
659
669
 
660
670
  # Builds the object from hash