tremendous_ruby 5.12.0 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tremendous/api/tremendous_api.rb +202 -9
- data/lib/tremendous/models/allow_email.rb +9 -0
- data/lib/tremendous/models/allow_email1.rb +9 -0
- data/lib/tremendous/models/allow_ip.rb +9 -0
- data/lib/tremendous/models/allow_ip1.rb +9 -0
- data/lib/tremendous/models/create_invoice_request.rb +48 -2
- data/lib/tremendous/models/create_topup200_response.rb +220 -0
- data/lib/tremendous/models/create_topup_request.rb +292 -0
- data/lib/tremendous/models/custom_field.rb +1 -1
- data/lib/tremendous/models/fraud_config_allow_email.rb +9 -0
- data/lib/tremendous/models/fraud_config_ip.rb +9 -0
- data/lib/tremendous/models/fraud_config_review_email.rb +19 -0
- data/lib/tremendous/models/fraud_review.rb +66 -56
- data/lib/tremendous/models/fraud_review_base.rb +358 -0
- data/lib/tremendous/models/fraud_review_list_item.rb +85 -4
- data/lib/tremendous/models/fraud_review_redemption_method.rb +7 -5
- data/lib/tremendous/models/funding_source.rb +3 -3
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +66 -56
- data/lib/tremendous/models/invoice.rb +26 -2
- data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +85 -4
- data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner_geo.rb +242 -0
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +3 -3
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +7 -2
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +26 -2
- data/lib/tremendous/models/list_products_response_products_inner.rb +24 -2
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +1 -1
- data/lib/tremendous/models/list_topups200_response.rb +232 -0
- data/lib/tremendous/models/list_topups200_response_topups_inner.rb +326 -0
- data/lib/tremendous/models/product.rb +24 -2
- data/lib/tremendous/models/review_email.rb +19 -0
- data/lib/tremendous/models/review_email1.rb +19 -0
- data/lib/tremendous/models/review_ip.rb +9 -0
- data/lib/tremendous/models/review_ip1.rb +9 -0
- data/lib/tremendous/models/reward_base_custom_fields_inner.rb +1 -1
- data/lib/tremendous/models/single_reward_order_reward_custom_fields_inner.rb +1 -1
- data/lib/tremendous/models/topup.rb +326 -0
- data/lib/tremendous/models/topup_create_request.rb +292 -0
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +8 -1
- metadata +9 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c5dd6664a6eefcc985f6a14c06479a546be0159faa9ec89c9de1453a464ee5b
|
|
4
|
+
data.tar.gz: 64512c466b295d0cd90efac6774506d6dcc94f32a2f6a587d5fe4f25596e001c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b971bd05346daf9744ad93b796b3101d0e62df5b8f3b6023da23f0443f58a6e809c7318324f1f71b0d7e40551d5d1b4666c6322066e1c0c6a4db147be1a786e8
|
|
7
|
+
data.tar.gz: 4f2489025b53b3b4b5eb28830b1913e3b7faf67dc46463757e624423b827f81c6e6da68463d8b1cb98da720eb139dabc225e74a17c2ec3e7c7a6d98521066a6c
|
|
@@ -552,7 +552,7 @@ module Tremendous
|
|
|
552
552
|
end
|
|
553
553
|
|
|
554
554
|
# Create invoice
|
|
555
|
-
# Creating an invoice is the way for your organization to fund your account's balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account's balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice
|
|
555
|
+
# Creating an invoice is the way for your organization to fund your account's balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account's balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the invoice</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">memo</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.</p> </td></tr> </tbody> </table> </div>
|
|
556
556
|
# @param create_invoice_request [CreateInvoiceRequest] Invoice details
|
|
557
557
|
# @param [Hash] opts the optional parameters
|
|
558
558
|
# @return [CreateInvoice200Response]
|
|
@@ -562,7 +562,7 @@ module Tremendous
|
|
|
562
562
|
end
|
|
563
563
|
|
|
564
564
|
# Create invoice
|
|
565
|
-
# Creating an invoice is the way for your organization to fund your account's balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account's balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice
|
|
565
|
+
# Creating an invoice is the way for your organization to fund your account's balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account's balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the invoice</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">memo</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.</p> </td></tr> </tbody> </table> </div>
|
|
566
566
|
# @param create_invoice_request [CreateInvoiceRequest] Invoice details
|
|
567
567
|
# @param [Hash] opts the optional parameters
|
|
568
568
|
# @return [Array<(CreateInvoice200Response, Integer, Hash)>] CreateInvoice200Response data, response status code and response headers
|
|
@@ -891,6 +891,68 @@ module Tremendous
|
|
|
891
891
|
return data, status_code, headers
|
|
892
892
|
end
|
|
893
893
|
|
|
894
|
+
# Create a topup
|
|
895
|
+
# @param [Hash] opts the optional parameters
|
|
896
|
+
# @option opts [CreateTopupRequest] :create_topup_request Parameters required to create a new topup. The `idempotency_key` should be unique for each request.
|
|
897
|
+
# @return [CreateTopup200Response]
|
|
898
|
+
def create_topup(opts = {})
|
|
899
|
+
data, _status_code, _headers = create_topup_with_http_info(opts)
|
|
900
|
+
data
|
|
901
|
+
end
|
|
902
|
+
|
|
903
|
+
# Create a topup
|
|
904
|
+
# @param [Hash] opts the optional parameters
|
|
905
|
+
# @option opts [CreateTopupRequest] :create_topup_request Parameters required to create a new topup. The `idempotency_key` should be unique for each request.
|
|
906
|
+
# @return [Array<(CreateTopup200Response, Integer, Hash)>] CreateTopup200Response data, response status code and response headers
|
|
907
|
+
def create_topup_with_http_info(opts = {})
|
|
908
|
+
if @api_client.config.debugging
|
|
909
|
+
@api_client.config.logger.debug 'Calling API: TremendousApi.create_topup ...'
|
|
910
|
+
end
|
|
911
|
+
# resource path
|
|
912
|
+
local_var_path = '/topups'
|
|
913
|
+
|
|
914
|
+
# query parameters
|
|
915
|
+
query_params = opts[:query_params] || {}
|
|
916
|
+
|
|
917
|
+
# header parameters
|
|
918
|
+
header_params = opts[:header_params] || {}
|
|
919
|
+
# HTTP header 'Accept' (if needed)
|
|
920
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
921
|
+
# HTTP header 'Content-Type'
|
|
922
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
923
|
+
if !content_type.nil?
|
|
924
|
+
header_params['Content-Type'] = content_type
|
|
925
|
+
end
|
|
926
|
+
|
|
927
|
+
# form parameters
|
|
928
|
+
form_params = opts[:form_params] || {}
|
|
929
|
+
|
|
930
|
+
# http body (model)
|
|
931
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_topup_request'])
|
|
932
|
+
|
|
933
|
+
# return_type
|
|
934
|
+
return_type = opts[:debug_return_type] || 'CreateTopup200Response'
|
|
935
|
+
|
|
936
|
+
# auth_names
|
|
937
|
+
auth_names = opts[:debug_auth_names] || ['BearerApiKey']
|
|
938
|
+
|
|
939
|
+
new_options = opts.merge(
|
|
940
|
+
:operation => :"TremendousApi.create_topup",
|
|
941
|
+
:header_params => header_params,
|
|
942
|
+
:query_params => query_params,
|
|
943
|
+
:form_params => form_params,
|
|
944
|
+
:body => post_body,
|
|
945
|
+
:auth_names => auth_names,
|
|
946
|
+
:return_type => return_type
|
|
947
|
+
)
|
|
948
|
+
|
|
949
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
950
|
+
if @api_client.config.debugging
|
|
951
|
+
@api_client.config.logger.debug "API called: TremendousApi#create_topup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
952
|
+
end
|
|
953
|
+
return data, status_code, headers
|
|
954
|
+
end
|
|
955
|
+
|
|
894
956
|
# Create webhook
|
|
895
957
|
# Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">url</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">uri</span></td><td><p>URL the webhook will make requests to</p> </td></tr> </tbody> </table> </div>
|
|
896
958
|
# @param create_webhook_request [CreateWebhookRequest] Webhook details
|
|
@@ -1685,8 +1747,8 @@ module Tremendous
|
|
|
1685
1747
|
end
|
|
1686
1748
|
|
|
1687
1749
|
# Retrieve funding source
|
|
1688
|
-
# Retrieve a funding source, identified by the given `id` in the URL
|
|
1689
|
-
# @param id [String] ID of the funding source that should be retrieved
|
|
1750
|
+
# Retrieve a funding source, identified by the given `id` in the URL. You can also use the special keyword `BALANCE` (case-insensitive) to retrieve the organization's balance funding source.
|
|
1751
|
+
# @param id [String] ID of the funding source that should be retrieved. Can also use \"BALANCE\" (case-insensitive) to retrieve the organization's balance funding source.
|
|
1690
1752
|
# @param [Hash] opts the optional parameters
|
|
1691
1753
|
# @return [GetFundingSource200Response]
|
|
1692
1754
|
def get_funding_source(id, opts = {})
|
|
@@ -1695,8 +1757,8 @@ module Tremendous
|
|
|
1695
1757
|
end
|
|
1696
1758
|
|
|
1697
1759
|
# Retrieve funding source
|
|
1698
|
-
# Retrieve a funding source, identified by the given `id` in the URL
|
|
1699
|
-
# @param id [String] ID of the funding source that should be retrieved
|
|
1760
|
+
# Retrieve a funding source, identified by the given `id` in the URL. You can also use the special keyword `BALANCE` (case-insensitive) to retrieve the organization's balance funding source.
|
|
1761
|
+
# @param id [String] ID of the funding source that should be retrieved. Can also use \"BALANCE\" (case-insensitive) to retrieve the organization's balance funding source.
|
|
1700
1762
|
# @param [Hash] opts the optional parameters
|
|
1701
1763
|
# @return [Array<(GetFundingSource200Response, Integer, Hash)>] GetFundingSource200Response data, response status code and response headers
|
|
1702
1764
|
def get_funding_source_with_http_info(id, opts = {})
|
|
@@ -1707,7 +1769,7 @@ module Tremendous
|
|
|
1707
1769
|
if @api_client.config.client_side_validation && id.nil?
|
|
1708
1770
|
fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_funding_source"
|
|
1709
1771
|
end
|
|
1710
|
-
pattern = Regexp.new(
|
|
1772
|
+
pattern = Regexp.new(/^([A-Z0-9]{4,20}|[Bb][Aa][Ll][Aa][Nn][Cc][Ee])$/)
|
|
1711
1773
|
if @api_client.config.client_side_validation && id !~ pattern
|
|
1712
1774
|
fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_funding_source, must conform to the pattern #{pattern}."
|
|
1713
1775
|
end
|
|
@@ -2209,6 +2271,74 @@ module Tremendous
|
|
|
2209
2271
|
return data, status_code, headers
|
|
2210
2272
|
end
|
|
2211
2273
|
|
|
2274
|
+
# Retrieve single topup
|
|
2275
|
+
# Retrieve a topup, identified by the given `id` in the URL.
|
|
2276
|
+
# @param id [String] ID of the topup request that should be retrieved
|
|
2277
|
+
# @param [Hash] opts the optional parameters
|
|
2278
|
+
# @return [CreateTopup200Response]
|
|
2279
|
+
def get_topup(id, opts = {})
|
|
2280
|
+
data, _status_code, _headers = get_topup_with_http_info(id, opts)
|
|
2281
|
+
data
|
|
2282
|
+
end
|
|
2283
|
+
|
|
2284
|
+
# Retrieve single topup
|
|
2285
|
+
# Retrieve a topup, identified by the given `id` in the URL.
|
|
2286
|
+
# @param id [String] ID of the topup request that should be retrieved
|
|
2287
|
+
# @param [Hash] opts the optional parameters
|
|
2288
|
+
# @return [Array<(CreateTopup200Response, Integer, Hash)>] CreateTopup200Response data, response status code and response headers
|
|
2289
|
+
def get_topup_with_http_info(id, opts = {})
|
|
2290
|
+
if @api_client.config.debugging
|
|
2291
|
+
@api_client.config.logger.debug 'Calling API: TremendousApi.get_topup ...'
|
|
2292
|
+
end
|
|
2293
|
+
# verify the required parameter 'id' is set
|
|
2294
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2295
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_topup"
|
|
2296
|
+
end
|
|
2297
|
+
pattern = Regexp.new(/[A-Z0-9]{4,20}/)
|
|
2298
|
+
if @api_client.config.client_side_validation && id !~ pattern
|
|
2299
|
+
fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_topup, must conform to the pattern #{pattern}."
|
|
2300
|
+
end
|
|
2301
|
+
|
|
2302
|
+
# resource path
|
|
2303
|
+
local_var_path = '/topups/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
2304
|
+
|
|
2305
|
+
# query parameters
|
|
2306
|
+
query_params = opts[:query_params] || {}
|
|
2307
|
+
|
|
2308
|
+
# header parameters
|
|
2309
|
+
header_params = opts[:header_params] || {}
|
|
2310
|
+
# HTTP header 'Accept' (if needed)
|
|
2311
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2312
|
+
|
|
2313
|
+
# form parameters
|
|
2314
|
+
form_params = opts[:form_params] || {}
|
|
2315
|
+
|
|
2316
|
+
# http body (model)
|
|
2317
|
+
post_body = opts[:debug_body]
|
|
2318
|
+
|
|
2319
|
+
# return_type
|
|
2320
|
+
return_type = opts[:debug_return_type] || 'CreateTopup200Response'
|
|
2321
|
+
|
|
2322
|
+
# auth_names
|
|
2323
|
+
auth_names = opts[:debug_auth_names] || ['BearerApiKey']
|
|
2324
|
+
|
|
2325
|
+
new_options = opts.merge(
|
|
2326
|
+
:operation => :"TremendousApi.get_topup",
|
|
2327
|
+
:header_params => header_params,
|
|
2328
|
+
:query_params => query_params,
|
|
2329
|
+
:form_params => form_params,
|
|
2330
|
+
:body => post_body,
|
|
2331
|
+
:auth_names => auth_names,
|
|
2332
|
+
:return_type => return_type
|
|
2333
|
+
)
|
|
2334
|
+
|
|
2335
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2336
|
+
if @api_client.config.debugging
|
|
2337
|
+
@api_client.config.logger.debug "API called: TremendousApi#get_topup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2338
|
+
end
|
|
2339
|
+
return data, status_code, headers
|
|
2340
|
+
end
|
|
2341
|
+
|
|
2212
2342
|
# Retrieve webhook
|
|
2213
2343
|
# > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
|
|
2214
2344
|
# @param id [String] ID of the webhook to retrieve
|
|
@@ -3118,6 +3248,7 @@ module Tremendous
|
|
|
3118
3248
|
# @param [Hash] opts the optional parameters
|
|
3119
3249
|
# @option opts [String] :country Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries
|
|
3120
3250
|
# @option opts [String] :currency Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies
|
|
3251
|
+
# @option opts [String] :subcategory Comma-separated list of [subcategories](https://developers.tremendous.com/reference/obj-schema-products-1), used to only retrieve products with the provided subcategories
|
|
3121
3252
|
# @return [ListProductsResponse]
|
|
3122
3253
|
def list_products(opts = {})
|
|
3123
3254
|
data, _status_code, _headers = list_products_with_http_info(opts)
|
|
@@ -3129,6 +3260,7 @@ module Tremendous
|
|
|
3129
3260
|
# @param [Hash] opts the optional parameters
|
|
3130
3261
|
# @option opts [String] :country Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries
|
|
3131
3262
|
# @option opts [String] :currency Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies
|
|
3263
|
+
# @option opts [String] :subcategory Comma-separated list of [subcategories](https://developers.tremendous.com/reference/obj-schema-products-1), used to only retrieve products with the provided subcategories
|
|
3132
3264
|
# @return [Array<(ListProductsResponse, Integer, Hash)>] ListProductsResponse data, response status code and response headers
|
|
3133
3265
|
def list_products_with_http_info(opts = {})
|
|
3134
3266
|
if @api_client.config.debugging
|
|
@@ -3141,6 +3273,7 @@ module Tremendous
|
|
|
3141
3273
|
query_params = opts[:query_params] || {}
|
|
3142
3274
|
query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
|
|
3143
3275
|
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
|
3276
|
+
query_params[:'subcategory'] = opts[:'subcategory'] if !opts[:'subcategory'].nil?
|
|
3144
3277
|
|
|
3145
3278
|
# header parameters
|
|
3146
3279
|
header_params = opts[:header_params] || {}
|
|
@@ -3177,7 +3310,7 @@ module Tremendous
|
|
|
3177
3310
|
end
|
|
3178
3311
|
|
|
3179
3312
|
# List rewards
|
|
3180
|
-
# Retrieve a list of all created rewards
|
|
3313
|
+
# Retrieve a list of all created rewards. You can query for rewards by custom field attributes using the field label and values as query params. [Learn more](https://developers.tremendous.com/docs/using-custom-fields-to-add-custom-data-to-rewards#querying-by-custom-fields)
|
|
3181
3314
|
# @param [Hash] opts the optional parameters
|
|
3182
3315
|
# @option opts [Integer] :offset Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC).
|
|
3183
3316
|
# @option opts [Integer] :limit Limits the number of rewards listed. The maximum value is 500 and the default is 100.
|
|
@@ -3188,7 +3321,7 @@ module Tremendous
|
|
|
3188
3321
|
end
|
|
3189
3322
|
|
|
3190
3323
|
# List rewards
|
|
3191
|
-
# Retrieve a list of all created rewards
|
|
3324
|
+
# Retrieve a list of all created rewards. You can query for rewards by custom field attributes using the field label and values as query params. [Learn more](https://developers.tremendous.com/docs/using-custom-fields-to-add-custom-data-to-rewards#querying-by-custom-fields)
|
|
3192
3325
|
# @param [Hash] opts the optional parameters
|
|
3193
3326
|
# @option opts [Integer] :offset Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC).
|
|
3194
3327
|
# @option opts [Integer] :limit Limits the number of rewards listed. The maximum value is 500 and the default is 100.
|
|
@@ -3296,6 +3429,66 @@ module Tremendous
|
|
|
3296
3429
|
return data, status_code, headers
|
|
3297
3430
|
end
|
|
3298
3431
|
|
|
3432
|
+
# List topups
|
|
3433
|
+
# Retrieve a list of all topup requests.
|
|
3434
|
+
# @param [Hash] opts the optional parameters
|
|
3435
|
+
# @option opts [Integer] :offset Offsets the returned list by the given number of topups. The returned topups are ordered and offset by their creation date (DESC).
|
|
3436
|
+
# @return [ListTopups200Response]
|
|
3437
|
+
def list_topups(opts = {})
|
|
3438
|
+
data, _status_code, _headers = list_topups_with_http_info(opts)
|
|
3439
|
+
data
|
|
3440
|
+
end
|
|
3441
|
+
|
|
3442
|
+
# List topups
|
|
3443
|
+
# Retrieve a list of all topup requests.
|
|
3444
|
+
# @param [Hash] opts the optional parameters
|
|
3445
|
+
# @option opts [Integer] :offset Offsets the returned list by the given number of topups. The returned topups are ordered and offset by their creation date (DESC).
|
|
3446
|
+
# @return [Array<(ListTopups200Response, Integer, Hash)>] ListTopups200Response data, response status code and response headers
|
|
3447
|
+
def list_topups_with_http_info(opts = {})
|
|
3448
|
+
if @api_client.config.debugging
|
|
3449
|
+
@api_client.config.logger.debug 'Calling API: TremendousApi.list_topups ...'
|
|
3450
|
+
end
|
|
3451
|
+
# resource path
|
|
3452
|
+
local_var_path = '/topups'
|
|
3453
|
+
|
|
3454
|
+
# query parameters
|
|
3455
|
+
query_params = opts[:query_params] || {}
|
|
3456
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
3457
|
+
|
|
3458
|
+
# header parameters
|
|
3459
|
+
header_params = opts[:header_params] || {}
|
|
3460
|
+
# HTTP header 'Accept' (if needed)
|
|
3461
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3462
|
+
|
|
3463
|
+
# form parameters
|
|
3464
|
+
form_params = opts[:form_params] || {}
|
|
3465
|
+
|
|
3466
|
+
# http body (model)
|
|
3467
|
+
post_body = opts[:debug_body]
|
|
3468
|
+
|
|
3469
|
+
# return_type
|
|
3470
|
+
return_type = opts[:debug_return_type] || 'ListTopups200Response'
|
|
3471
|
+
|
|
3472
|
+
# auth_names
|
|
3473
|
+
auth_names = opts[:debug_auth_names] || ['BearerApiKey']
|
|
3474
|
+
|
|
3475
|
+
new_options = opts.merge(
|
|
3476
|
+
:operation => :"TremendousApi.list_topups",
|
|
3477
|
+
:header_params => header_params,
|
|
3478
|
+
:query_params => query_params,
|
|
3479
|
+
:form_params => form_params,
|
|
3480
|
+
:body => post_body,
|
|
3481
|
+
:auth_names => auth_names,
|
|
3482
|
+
:return_type => return_type
|
|
3483
|
+
)
|
|
3484
|
+
|
|
3485
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3486
|
+
if @api_client.config.debugging
|
|
3487
|
+
@api_client.config.logger.debug "API called: TremendousApi#list_topups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3488
|
+
end
|
|
3489
|
+
return data, status_code, headers
|
|
3490
|
+
end
|
|
3491
|
+
|
|
3299
3492
|
# List events
|
|
3300
3493
|
# Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
|
|
3301
3494
|
# @param id [String] ID of the webhook to list the events for
|
|
@@ -83,6 +83,10 @@ module Tremendous
|
|
|
83
83
|
invalid_properties.push('invalid value for "emails", emails cannot be nil.')
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
+
if @emails.length > 50000
|
|
87
|
+
invalid_properties.push('invalid value for "emails", number of items must be less than or equal to 50000.')
|
|
88
|
+
end
|
|
89
|
+
|
|
86
90
|
invalid_properties
|
|
87
91
|
end
|
|
88
92
|
|
|
@@ -91,6 +95,7 @@ module Tremendous
|
|
|
91
95
|
def valid?
|
|
92
96
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
97
|
return false if @emails.nil?
|
|
98
|
+
return false if @emails.length > 50000
|
|
94
99
|
true
|
|
95
100
|
end
|
|
96
101
|
|
|
@@ -101,6 +106,10 @@ module Tremendous
|
|
|
101
106
|
fail ArgumentError, 'emails cannot be nil'
|
|
102
107
|
end
|
|
103
108
|
|
|
109
|
+
if emails.length > 50000
|
|
110
|
+
fail ArgumentError, 'invalid value for "emails", number of items must be less than or equal to 50000.'
|
|
111
|
+
end
|
|
112
|
+
|
|
104
113
|
@emails = emails
|
|
105
114
|
end
|
|
106
115
|
|
|
@@ -83,6 +83,10 @@ module Tremendous
|
|
|
83
83
|
invalid_properties.push('invalid value for "emails", emails cannot be nil.')
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
+
if @emails.length > 50000
|
|
87
|
+
invalid_properties.push('invalid value for "emails", number of items must be less than or equal to 50000.')
|
|
88
|
+
end
|
|
89
|
+
|
|
86
90
|
invalid_properties
|
|
87
91
|
end
|
|
88
92
|
|
|
@@ -91,6 +95,7 @@ module Tremendous
|
|
|
91
95
|
def valid?
|
|
92
96
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
97
|
return false if @emails.nil?
|
|
98
|
+
return false if @emails.length > 50000
|
|
94
99
|
true
|
|
95
100
|
end
|
|
96
101
|
|
|
@@ -101,6 +106,10 @@ module Tremendous
|
|
|
101
106
|
fail ArgumentError, 'emails cannot be nil'
|
|
102
107
|
end
|
|
103
108
|
|
|
109
|
+
if emails.length > 50000
|
|
110
|
+
fail ArgumentError, 'invalid value for "emails", number of items must be less than or equal to 50000.'
|
|
111
|
+
end
|
|
112
|
+
|
|
104
113
|
@emails = emails
|
|
105
114
|
end
|
|
106
115
|
|
|
@@ -83,6 +83,10 @@ module Tremendous
|
|
|
83
83
|
invalid_properties.push('invalid value for "ips", ips cannot be nil.')
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
+
if @ips.length > 50000
|
|
87
|
+
invalid_properties.push('invalid value for "ips", number of items must be less than or equal to 50000.')
|
|
88
|
+
end
|
|
89
|
+
|
|
86
90
|
invalid_properties
|
|
87
91
|
end
|
|
88
92
|
|
|
@@ -91,6 +95,7 @@ module Tremendous
|
|
|
91
95
|
def valid?
|
|
92
96
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
97
|
return false if @ips.nil?
|
|
98
|
+
return false if @ips.length > 50000
|
|
94
99
|
true
|
|
95
100
|
end
|
|
96
101
|
|
|
@@ -101,6 +106,10 @@ module Tremendous
|
|
|
101
106
|
fail ArgumentError, 'ips cannot be nil'
|
|
102
107
|
end
|
|
103
108
|
|
|
109
|
+
if ips.length > 50000
|
|
110
|
+
fail ArgumentError, 'invalid value for "ips", number of items must be less than or equal to 50000.'
|
|
111
|
+
end
|
|
112
|
+
|
|
104
113
|
@ips = ips
|
|
105
114
|
end
|
|
106
115
|
|
|
@@ -83,6 +83,10 @@ module Tremendous
|
|
|
83
83
|
invalid_properties.push('invalid value for "ips", ips cannot be nil.')
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
+
if @ips.length > 50000
|
|
87
|
+
invalid_properties.push('invalid value for "ips", number of items must be less than or equal to 50000.')
|
|
88
|
+
end
|
|
89
|
+
|
|
86
90
|
invalid_properties
|
|
87
91
|
end
|
|
88
92
|
|
|
@@ -91,6 +95,7 @@ module Tremendous
|
|
|
91
95
|
def valid?
|
|
92
96
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
97
|
return false if @ips.nil?
|
|
98
|
+
return false if @ips.length > 50000
|
|
94
99
|
true
|
|
95
100
|
end
|
|
96
101
|
|
|
@@ -101,6 +106,10 @@ module Tremendous
|
|
|
101
106
|
fail ArgumentError, 'ips cannot be nil'
|
|
102
107
|
end
|
|
103
108
|
|
|
109
|
+
if ips.length > 50000
|
|
110
|
+
fail ArgumentError, 'invalid value for "ips", number of items must be less than or equal to 50000.'
|
|
111
|
+
end
|
|
112
|
+
|
|
104
113
|
@ips = ips
|
|
105
114
|
end
|
|
106
115
|
|
|
@@ -18,17 +18,43 @@ module Tremendous
|
|
|
18
18
|
# Reference to the purchase order number within your organization
|
|
19
19
|
attr_accessor :po_number
|
|
20
20
|
|
|
21
|
-
# Amount of the invoice
|
|
21
|
+
# Amount of the invoice
|
|
22
22
|
attr_accessor :amount
|
|
23
23
|
|
|
24
|
+
# Currency of the invoice
|
|
25
|
+
attr_accessor :currency
|
|
26
|
+
|
|
24
27
|
# A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.
|
|
25
28
|
attr_accessor :memo
|
|
26
29
|
|
|
30
|
+
class EnumAttributeValidator
|
|
31
|
+
attr_reader :datatype
|
|
32
|
+
attr_reader :allowable_values
|
|
33
|
+
|
|
34
|
+
def initialize(datatype, allowable_values)
|
|
35
|
+
@allowable_values = allowable_values.map do |value|
|
|
36
|
+
case datatype.to_s
|
|
37
|
+
when /Integer/i
|
|
38
|
+
value.to_i
|
|
39
|
+
when /Float/i
|
|
40
|
+
value.to_f
|
|
41
|
+
else
|
|
42
|
+
value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def valid?(value)
|
|
48
|
+
!value || allowable_values.include?(value)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
27
52
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
53
|
def self.attribute_map
|
|
29
54
|
{
|
|
30
55
|
:'po_number' => :'po_number',
|
|
31
56
|
:'amount' => :'amount',
|
|
57
|
+
:'currency' => :'currency',
|
|
32
58
|
:'memo' => :'memo'
|
|
33
59
|
}
|
|
34
60
|
end
|
|
@@ -48,6 +74,7 @@ module Tremendous
|
|
|
48
74
|
{
|
|
49
75
|
:'po_number' => :'String',
|
|
50
76
|
:'amount' => :'Float',
|
|
77
|
+
:'currency' => :'String',
|
|
51
78
|
:'memo' => :'String'
|
|
52
79
|
}
|
|
53
80
|
end
|
|
@@ -86,6 +113,12 @@ module Tremendous
|
|
|
86
113
|
self.amount = nil
|
|
87
114
|
end
|
|
88
115
|
|
|
116
|
+
if attributes.key?(:'currency')
|
|
117
|
+
self.currency = attributes[:'currency']
|
|
118
|
+
else
|
|
119
|
+
self.currency = 'USD'
|
|
120
|
+
end
|
|
121
|
+
|
|
89
122
|
if attributes.key?(:'memo')
|
|
90
123
|
self.memo = attributes[:'memo']
|
|
91
124
|
end
|
|
@@ -108,6 +141,8 @@ module Tremendous
|
|
|
108
141
|
def valid?
|
|
109
142
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
110
143
|
return false if @amount.nil?
|
|
144
|
+
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
145
|
+
return false unless currency_validator.valid?(@currency)
|
|
111
146
|
true
|
|
112
147
|
end
|
|
113
148
|
|
|
@@ -121,6 +156,16 @@ module Tremendous
|
|
|
121
156
|
@amount = amount
|
|
122
157
|
end
|
|
123
158
|
|
|
159
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
160
|
+
# @param [Object] currency Object to be assigned
|
|
161
|
+
def currency=(currency)
|
|
162
|
+
validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
163
|
+
unless validator.valid?(currency)
|
|
164
|
+
fail ArgumentError, "invalid value for \"currency\", must be one of #{validator.allowable_values}."
|
|
165
|
+
end
|
|
166
|
+
@currency = currency
|
|
167
|
+
end
|
|
168
|
+
|
|
124
169
|
# Checks equality by comparing each attribute.
|
|
125
170
|
# @param [Object] Object to be compared
|
|
126
171
|
def ==(o)
|
|
@@ -128,6 +173,7 @@ module Tremendous
|
|
|
128
173
|
self.class == o.class &&
|
|
129
174
|
po_number == o.po_number &&
|
|
130
175
|
amount == o.amount &&
|
|
176
|
+
currency == o.currency &&
|
|
131
177
|
memo == o.memo
|
|
132
178
|
end
|
|
133
179
|
|
|
@@ -140,7 +186,7 @@ module Tremendous
|
|
|
140
186
|
# Calculates hash code according to all attributes.
|
|
141
187
|
# @return [Integer] Hash code
|
|
142
188
|
def hash
|
|
143
|
-
[po_number, amount, memo].hash
|
|
189
|
+
[po_number, amount, currency, memo].hash
|
|
144
190
|
end
|
|
145
191
|
|
|
146
192
|
# Builds the object from hash
|