Class: Tremendous::TremendousApi
- Inherits:
-
Object
- Object
- Tremendous::TremendousApi
- Defined in:
- lib/tremendous/api/tremendous_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#approve_order(id, opts = {}) ⇒ GetOrder200Response
Approve order Approves an order that is pending review, identified by the given ‘id` in the URL.
-
#approve_order_with_http_info(id, opts = {}) ⇒ Array<(GetOrder200Response, Integer, Hash)>
Approve order Approves an order that is pending review, identified by the given `id` in the URL.
-
#block_fraud_review(id, opts = {}) ⇒ GetFraudReview200Response
Block fraud review Completes the fraud review identified by the given ‘id` in the URL, and blocks the reward.
-
#block_fraud_review_with_http_info(id, opts = {}) ⇒ Array<(GetFraudReview200Response, Integer, Hash)>
Block fraud review Completes the fraud review identified by the given `id` in the URL, and blocks the reward.
-
#cancel_reward(id, opts = {}) ⇒ Object
Cancel reward Cancels a reward, identified by the given ‘id` in the URL.
-
#cancel_reward_with_http_info(id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Cancel reward Cancels a reward, identified by the given `id` in the URL.
-
#create_api_key(opts = {}) ⇒ CreateApiKey200Response
Create API key Creates a new API key.
-
#create_api_key_with_http_info(opts = {}) ⇒ Array<(CreateApiKey200Response, Integer, Hash)>
Create API key Creates a new API key.
-
#create_campaign(create_campaign_request, opts = {}) ⇒ CreateCampaign200Response
Create campaign.
-
#create_campaign_with_http_info(create_campaign_request, opts = {}) ⇒ Array<(CreateCampaign200Response, Integer, Hash)>
Create campaign.
-
#create_connected_organization(create_connected_organization_request, opts = {}) ⇒ CreateConnectedOrganization200Response
Create connected organization Create a connected organization.
-
#create_connected_organization_member(create_connected_organization_member_request, opts = {}) ⇒ CreateConnectedOrganizationMember200Response
Create connected organization member Create a connected organization member.
-
#create_connected_organization_member_session(id, create_connected_organization_member_session_request, opts = {}) ⇒ CreateConnectedOrganizationMemberSession200Response
Create connected organization member session Create a connected organization member session.
-
#create_connected_organization_member_session_with_http_info(id, create_connected_organization_member_session_request, opts = {}) ⇒ Array<(CreateConnectedOrganizationMemberSession200Response, Integer, Hash)>
Create connected organization member session Create a connected organization member session.
-
#create_connected_organization_member_with_http_info(create_connected_organization_member_request, opts = {}) ⇒ Array<(CreateConnectedOrganizationMember200Response, Integer, Hash)>
Create connected organization member Create a connected organization member.
-
#create_connected_organization_with_http_info(create_connected_organization_request, opts = {}) ⇒ Array<(CreateConnectedOrganization200Response, Integer, Hash)>
Create connected organization Create a connected organization.
-
#create_field(create_field_request, opts = {}) ⇒ CreateField200Response
Create field Create a custom field to be associated with rewards.
-
#create_field_with_http_info(create_field_request, opts = {}) ⇒ Array<(CreateField200Response, Integer, Hash)>
Create field Create a custom field to be associated with rewards.
-
#create_invoice(create_invoice_request, opts = {}) ⇒ CreateInvoice200Response
Create invoice Creating an invoice is the way for your organization to fund your account’s balance.
-
#create_invoice_with_http_info(create_invoice_request, opts = {}) ⇒ Array<(CreateInvoice200Response, Integer, Hash)>
Create invoice Creating an invoice is the way for your organization to fund your account's balance.
-
#create_member(create_member_request, opts = {}) ⇒ CreateMember200Response
Create member Each organization has one or more users that can access and manage that organization.
-
#create_member_with_http_info(create_member_request, opts = {}) ⇒ Array<(CreateMember200Response, Integer, Hash)>
Create member Each organization has one or more users that can access and manage that organization.
-
#create_order(create_order_request, opts = {}) ⇒ CreateOrder200Response
Create order Every time you want to send out a reward through Tremendous you need to create an order for it.
-
#create_order_with_http_info(create_order_request, opts = {}) ⇒ Array<(CreateOrder200Response, Integer, Hash)>
Create order Every time you want to send out a reward through Tremendous you need to create an order for it.
-
#create_organization(create_organization_request, opts = {}) ⇒ CreateOrganization200Response
Create organization Organizations are a way to separate different parts of your business within the same Tremendous account.
-
#create_organization_with_http_info(create_organization_request, opts = {}) ⇒ Array<(CreateOrganization200Response, Integer, Hash)>
Create organization Organizations are a way to separate different parts of your business within the same Tremendous account.
-
#create_report(create_report_request, opts = {}) ⇒ CreateReport200Response
Create report Creating a report allows your organization to programmatically retrieve information that’s available in our dashboard UI.
-
#create_report_with_http_info(create_report_request, opts = {}) ⇒ Array<(CreateReport200Response, Integer, Hash)>
Create report Creating a report allows your organization to programmatically retrieve information that's available in our dashboard UI.
-
#create_topup(opts = {}) ⇒ CreateTopup200Response
Create a topup.
-
#create_topup_with_http_info(opts = {}) ⇒ Array<(CreateTopup200Response, Integer, Hash)>
Create a topup.
-
#create_webhook(create_webhook_request, opts = {}) ⇒ CreateWebhook200Response
Create webhook Tremendous uses webhooks as a notification system for various events that happen in your account.
-
#create_webhook_with_http_info(create_webhook_request, opts = {}) ⇒ Array<(CreateWebhook200Response, Integer, Hash)>
Create webhook Tremendous uses webhooks as a notification system for various events that happen in your account.
-
#delete_fraud_rule(rule_type, opts = {}) ⇒ DeleteFraudRule200Response
Delete fraud rule Deletes the rule of the type passed in the URL.
-
#delete_fraud_rule_with_http_info(rule_type, opts = {}) ⇒ Array<(DeleteFraudRule200Response, Integer, Hash)>
Delete fraud rule Deletes the rule of the type passed in the URL.
-
#delete_invoices(id, opts = {}) ⇒ CreateInvoice200Response
Delete invoice Removes an invoice.
-
#delete_invoices_with_http_info(id, opts = {}) ⇒ Array<(CreateInvoice200Response, Integer, Hash)>
Delete invoice Removes an invoice.
-
#delete_webhook(id, opts = {}) ⇒ nil
Delete webhook > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1).
-
#delete_webhook_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete webhook > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1).
-
#download_invoice_csv(id, opts = {}) ⇒ String
Retrieve invoice as CSV Generates a CSV version for an invoice listing the associated rewards and orders.
-
#download_invoice_csv_with_http_info(id, opts = {}) ⇒ Array<(String, Integer, Hash)>
Retrieve invoice as CSV Generates a CSV version for an invoice listing the associated rewards and orders.
-
#download_invoice_pdf(id, opts = {}) ⇒ File
Retrieve invoice as PDF Generates a PDF version for an invoice.
-
#download_invoice_pdf_with_http_info(id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Retrieve invoice as PDF Generates a PDF version for an invoice.
-
#fraud_rule(rule_type, opts = {}) ⇒ FraudRule200Response
Configure fraud rule Configure a fraud rule of the type passed in the URL.
-
#fraud_rule_with_http_info(rule_type, opts = {}) ⇒ Array<(FraudRule200Response, Integer, Hash)>
Configure fraud rule Configure a fraud rule of the type passed in the URL.
-
#generate_reward_link(id, opts = {}) ⇒ GenerateRewardLink200Response
Generate a reward URL Generate a redemption link for the reward identified by the ‘id` in the URL.
-
#generate_reward_link_with_http_info(id, opts = {}) ⇒ Array<(GenerateRewardLink200Response, Integer, Hash)>
Generate a reward URL Generate a redemption link for the reward identified by the `id` in the URL.
-
#get_campaign(id, opts = {}) ⇒ CreateCampaign200Response
Retrieve campaign Retrieve a campaign, identified by the given ‘id` in the URL.
-
#get_campaign_with_http_info(id, opts = {}) ⇒ Array<(CreateCampaign200Response, Integer, Hash)>
Retrieve campaign Retrieve a campaign, identified by the given `id` in the URL.
-
#get_connected_organization(id, opts = {}) ⇒ CreateConnectedOrganization200Response
Retrieve a connected organization Retrieve the connected organization, identified by the given ‘id` in the URL.
-
#get_connected_organization_member(id, opts = {}) ⇒ CreateConnectedOrganizationMember200Response
Retrieve a connected organization member Retrieve the connected organization member, identified by the given ‘id` in the URL.
-
#get_connected_organization_member_with_http_info(id, opts = {}) ⇒ Array<(CreateConnectedOrganizationMember200Response, Integer, Hash)>
Retrieve a connected organization member Retrieve the connected organization member, identified by the given `id` in the URL.
-
#get_connected_organization_with_http_info(id, opts = {}) ⇒ Array<(CreateConnectedOrganization200Response, Integer, Hash)>
Retrieve a connected organization Retrieve the connected organization, identified by the given `id` in the URL.
-
#get_fraud_review(id, opts = {}) ⇒ GetFraudReview200Response
Retrieve single fraud review Retrieve the details of a fraud review, identified by the given ‘id` in the URL.
-
#get_fraud_review_with_http_info(id, opts = {}) ⇒ Array<(GetFraudReview200Response, Integer, Hash)>
Retrieve single fraud review Retrieve the details of a fraud review, identified by the given `id` in the URL.
-
#get_funding_source(id, opts = {}) ⇒ GetFundingSource200Response
Retrieve funding source Retrieve a funding source, identified by the given ‘id` in the URL.
-
#get_funding_source_with_http_info(id, opts = {}) ⇒ Array<(GetFundingSource200Response, Integer, Hash)>
Retrieve funding source Retrieve a funding source, identified by the given `id` in the URL.
-
#get_invoice(id, opts = {}) ⇒ CreateInvoice200Response
Retrieve invoice Retrieve an invoice, identified by the given ‘id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits.
-
#get_invoice_with_http_info(id, opts = {}) ⇒ Array<(CreateInvoice200Response, Integer, Hash)>
Retrieve invoice Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits.
-
#get_member(id, opts = {}) ⇒ GetMember200Response
Retrieve member.
-
#get_member_with_http_info(id, opts = {}) ⇒ Array<(GetMember200Response, Integer, Hash)>
Retrieve member.
-
#get_order(id, opts = {}) ⇒ GetOrder200Response
Retrieve order Retrieve the order, identified by the given ‘id` in the URL.
-
#get_order_with_http_info(id, opts = {}) ⇒ Array<(GetOrder200Response, Integer, Hash)>
Retrieve order Retrieve the order, identified by the given `id` in the URL.
-
#get_organization(id, opts = {}) ⇒ GetOrganization200Response
Retrieve organization.
-
#get_organization_with_http_info(id, opts = {}) ⇒ Array<(GetOrganization200Response, Integer, Hash)>
Retrieve organization.
-
#get_product(id, opts = {}) ⇒ GetProductResponse
Retrieve product Retrieve a product, identified by the given ‘id` in the URL.
-
#get_product_with_http_info(id, opts = {}) ⇒ Array<(GetProductResponse, Integer, Hash)>
Retrieve product Retrieve a product, identified by the given `id` in the URL.
-
#get_report(id, opts = {}) ⇒ CreateReport200Response
Retrieve report Retrieve the report, identified by the given ‘id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL.
-
#get_report_with_http_info(id, opts = {}) ⇒ Array<(CreateReport200Response, Integer, Hash)>
Retrieve report Retrieve the report, identified by the given `id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL.
-
#get_reward(id, opts = {}) ⇒ GetReward200Response
Retrieve single reward Retrieve the reward, identified by the given ‘id` in the URL.
-
#get_reward_with_http_info(id, opts = {}) ⇒ Array<(GetReward200Response, Integer, Hash)>
Retrieve single reward Retrieve the reward, identified by the given `id` in the URL.
-
#get_topup(id, opts = {}) ⇒ CreateTopup200Response
Retrieve single topup Retrieve a topup, identified by the given ‘id` in the URL.
-
#get_topup_with_http_info(id, opts = {}) ⇒ Array<(CreateTopup200Response, Integer, Hash)>
Retrieve single topup Retrieve a topup, identified by the given `id` in the URL.
-
#get_webhook(id, opts = {}) ⇒ CreateWebhook200Response
Retrieve webhook > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1).
-
#get_webhook_with_http_info(id, opts = {}) ⇒ Array<(CreateWebhook200Response, Integer, Hash)>
Retrieve webhook > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1).
-
#initialize(api_client = ApiClient.default) ⇒ TremendousApi
constructor
A new instance of TremendousApi.
-
#list_balance_transactions(opts = {}) ⇒ ListBalanceTransactions200Response
List balance transactions Fetch a list of all balance transactions on your account.
-
#list_balance_transactions_with_http_info(opts = {}) ⇒ Array<(ListBalanceTransactions200Response, Integer, Hash)>
List balance transactions Fetch a list of all balance transactions on your account.
-
#list_campaigns(opts = {}) ⇒ ListCampaigns200Response
List campaigns Retrieve a list of all campaigns created in your account.
-
#list_campaigns_with_http_info(opts = {}) ⇒ Array<(ListCampaigns200Response, Integer, Hash)>
List campaigns Retrieve a list of all campaigns created in your account.
-
#list_connected_organization_members(connected_organization_id, opts = {}) ⇒ ListConnectedOrganizationMembers200Response
List connected organization members Retrieve a list of connected organization members.
-
#list_connected_organization_members_with_http_info(connected_organization_id, opts = {}) ⇒ Array<(ListConnectedOrganizationMembers200Response, Integer, Hash)>
List connected organization members Retrieve a list of connected organization members.
-
#list_connected_organizations(opts = {}) ⇒ ListConnectedOrganizations200Response
List connected organizations Retrieve a list of connected organizations.
-
#list_connected_organizations_with_http_info(opts = {}) ⇒ Array<(ListConnectedOrganizations200Response, Integer, Hash)>
List connected organizations Retrieve a list of connected organizations.
-
#list_fields(opts = {}) ⇒ ListFields200Response
List fields For reporting and analytics purposes, custom fields can be associated with rewards generated through the API.
-
#list_fields_with_http_info(opts = {}) ⇒ Array<(ListFields200Response, Integer, Hash)>
List fields For reporting and analytics purposes, custom fields can be associated with rewards generated through the API.
-
#list_forex(opts = {}) ⇒ ListForexResponse
List exchange rates Retrieve a list of exchange rates.
-
#list_forex_with_http_info(opts = {}) ⇒ Array<(ListForexResponse, Integer, Hash)>
List exchange rates Retrieve a list of exchange rates.
-
#list_fraud_reviews(opts = {}) ⇒ ListFraudReviews200Response
List fraud reviews Retrieve a paginated list of all fraud reviews.
-
#list_fraud_reviews_with_http_info(opts = {}) ⇒ Array<(ListFraudReviews200Response, Integer, Hash)>
List fraud reviews Retrieve a paginated list of all fraud reviews.
-
#list_fraud_rules(opts = {}) ⇒ ListFraudRules200Response
List fraud rules List active fraud rules associated with the organization tied to your API key.
-
#list_fraud_rules_with_http_info(opts = {}) ⇒ Array<(ListFraudRules200Response, Integer, Hash)>
List fraud rules List active fraud rules associated with the organization tied to your API key.
-
#list_funding_sources(opts = {}) ⇒ ListFundingSources200Response
List funding sources Retrieve a list of all funding sources in your organization’s account.
-
#list_funding_sources_with_http_info(opts = {}) ⇒ Array<(ListFundingSources200Response, Integer, Hash)>
List funding sources Retrieve a list of all funding sources in your organization's account.
-
#list_invoices(opts = {}) ⇒ ListInvoices200Response
List invoices Fetch a list of all invoices on your account.
-
#list_invoices_with_http_info(opts = {}) ⇒ Array<(ListInvoices200Response, Integer, Hash)>
List invoices Fetch a list of all invoices on your account.
-
#list_members(opts = {}) ⇒ ListMembers200Response
List members To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request.
-
#list_members_with_http_info(opts = {}) ⇒ Array<(ListMembers200Response, Integer, Hash)>
List members To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request.
-
#list_orders(opts = {}) ⇒ ListOrders200Response
List orders Retrieve a list of orders.
-
#list_orders_with_http_info(opts = {}) ⇒ Array<(ListOrders200Response, Integer, Hash)>
List orders Retrieve a list of orders.
-
#list_organizations(opts = {}) ⇒ ListOrganizations200Response
List organizations The returned list only includes the organization to which the API key belongs to, that is used for the request.
-
#list_organizations_with_http_info(opts = {}) ⇒ Array<(ListOrganizations200Response, Integer, Hash)>
List organizations The returned list only includes the organization to which the API key belongs to, that is used for the request.
-
#list_products(opts = {}) ⇒ ListProductsResponse
List products Retrieve a list of available products.
-
#list_products_with_http_info(opts = {}) ⇒ Array<(ListProductsResponse, Integer, Hash)>
List products Retrieve a list of available products.
-
#list_rewards(opts = {}) ⇒ ListRewards200Response
List rewards Retrieve a list of all created rewards.
-
#list_rewards_with_http_info(opts = {}) ⇒ Array<(ListRewards200Response, Integer, Hash)>
List rewards Retrieve a list of all created rewards.
-
#list_roles(opts = {}) ⇒ ListRoles200Response
List roles List all available roles in the organization.
-
#list_roles_with_http_info(opts = {}) ⇒ Array<(ListRoles200Response, Integer, Hash)>
List roles List all available roles in the organization.
-
#list_topups(opts = {}) ⇒ ListTopups200Response
List topups Retrieve a list of all topup requests.
-
#list_topups_with_http_info(opts = {}) ⇒ Array<(ListTopups200Response, Integer, Hash)>
List topups Retrieve a list of all topup requests.
-
#list_webhook_events(id, opts = {}) ⇒ ListWebhookEvents200Response
List events Lists all event types that can be sent to the configured webhook endpoint.
-
#list_webhook_events_with_http_info(id, opts = {}) ⇒ Array<(ListWebhookEvents200Response, Integer, Hash)>
List events Lists all event types that can be sent to the configured webhook endpoint.
-
#list_webhooks(opts = {}) ⇒ ListWebhooks200Response
List webhooks Every organization can only have one webhook.
-
#list_webhooks_with_http_info(opts = {}) ⇒ Array<(ListWebhooks200Response, Integer, Hash)>
List webhooks Every organization can only have one webhook.
-
#reject_order(id, opts = {}) ⇒ GetOrder200Response
Reject order Rejects an order that is pending review, identified by the given ‘id` in the URL.
-
#reject_order_with_http_info(id, opts = {}) ⇒ Array<(GetOrder200Response, Integer, Hash)>
Reject order Rejects an order that is pending review, identified by the given `id` in the URL.
-
#release_fraud_review(id, opts = {}) ⇒ GetFraudReview200Response
Release fraud review Completes the fraud review identified by the given ‘id` in the URL, and releases the associated reward to the recipient.
-
#release_fraud_review_with_http_info(id, opts = {}) ⇒ Array<(GetFraudReview200Response, Integer, Hash)>
Release fraud review Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient.
-
#resend_reward(id, opts = {}) ⇒ Object
Resend reward Resends a reward, identified by the given ‘id` in the URL, to its recipient.
-
#resend_reward_with_http_info(id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Resend reward Resends a reward, identified by the given `id` in the URL, to its recipient.
-
#simulate_webhook(id, simulate_webhook_request, opts = {}) ⇒ String
Test webhook Making a request to this endpoint will cause our system to trigger a webhook for the specified event.
-
#simulate_webhook_with_http_info(id, simulate_webhook_request, opts = {}) ⇒ Array<(String, Integer, Hash)>
Test webhook Making a request to this endpoint will cause our system to trigger a webhook for the specified event.
-
#update_campaign(id, update_campaign_request, opts = {}) ⇒ CreateCampaign200Response
Update campaign.
-
#update_campaign_with_http_info(id, update_campaign_request, opts = {}) ⇒ Array<(CreateCampaign200Response, Integer, Hash)>
Update campaign.
-
#update_fraud_rule_list(rule_type, update_fraud_rule_list_request, opts = {}) ⇒ UpdateFraudRuleList200Response
Update fraud rule list Use this endpoint to modify a list associated with an already-configured rule.
-
#update_fraud_rule_list_with_http_info(rule_type, update_fraud_rule_list_request, opts = {}) ⇒ Array<(UpdateFraudRuleList200Response, Integer, Hash)>
Update fraud rule list Use this endpoint to modify a list associated with an already-configured rule.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TremendousApi
Returns a new instance of TremendousApi.
19 20 21 |
# File 'lib/tremendous/api/tremendous_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/tremendous/api/tremendous_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#approve_order(id, opts = {}) ⇒ GetOrder200Response
Approve order Approves an order that is pending review, identified by the given ‘id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable ’Allow approvals via API’ via the organization”s ‘Order Approvals’ settings from the Tremendous dashboard.
27 28 29 30 |
# File 'lib/tremendous/api/tremendous_api.rb', line 27 def approve_order(id, opts = {}) data, _status_code, _headers = approve_order_with_http_info(id, opts) data end |
#approve_order_with_http_info(id, opts = {}) ⇒ Array<(GetOrder200Response, Integer, Hash)>
Approve order Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable 'Allow approvals via API' via the organization''s 'Order Approvals' settings from the Tremendous dashboard.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/tremendous/api/tremendous_api.rb', line 37 def approve_order_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.approve_order ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.approve_order" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.approve_order, must conform to the pattern #{pattern}." end # resource path local_var_path = '/order_approvals/{id}/approve'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetOrder200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.approve_order", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#approve_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#block_fraud_review(id, opts = {}) ⇒ GetFraudReview200Response
Block fraud review Completes the fraud review identified by the given ‘id` in the URL, and blocks the reward. The reward is canceled and the amount refunded.
95 96 97 98 |
# File 'lib/tremendous/api/tremendous_api.rb', line 95 def block_fraud_review(id, opts = {}) data, _status_code, _headers = block_fraud_review_with_http_info(id, opts) data end |
#block_fraud_review_with_http_info(id, opts = {}) ⇒ Array<(GetFraudReview200Response, Integer, Hash)>
Block fraud review Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/tremendous/api/tremendous_api.rb', line 105 def block_fraud_review_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.block_fraud_review ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.block_fraud_review" end # resource path local_var_path = '/fraud_reviews/{id}/block'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetFraudReview200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.block_fraud_review", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#block_fraud_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#cancel_reward(id, opts = {}) ⇒ Object
Cancel reward Cancels a reward, identified by the given ‘id` in the URL. Only non-expired rewards with a delivery failure can be canceled.
158 159 160 161 |
# File 'lib/tremendous/api/tremendous_api.rb', line 158 def cancel_reward(id, opts = {}) data, _status_code, _headers = cancel_reward_with_http_info(id, opts) data end |
#cancel_reward_with_http_info(id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Cancel reward Cancels a reward, identified by the given `id` in the URL. Only non-expired rewards with a delivery failure can be canceled.
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/tremendous/api/tremendous_api.rb', line 168 def cancel_reward_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.cancel_reward ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.cancel_reward" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.cancel_reward, must conform to the pattern #{pattern}." end # resource path local_var_path = '/rewards/{id}/cancel'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.cancel_reward", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#cancel_reward\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_api_key(opts = {}) ⇒ CreateApiKey200Response
Create API key Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.**
225 226 227 228 |
# File 'lib/tremendous/api/tremendous_api.rb', line 225 def create_api_key(opts = {}) data, _status_code, _headers = create_api_key_with_http_info(opts) data end |
#create_api_key_with_http_info(opts = {}) ⇒ Array<(CreateApiKey200Response, Integer, Hash)>
Create API key Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.**
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/tremendous/api/tremendous_api.rb', line 234 def create_api_key_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_api_key ...' end # resource path local_var_path = '/organizations/create_api_key' # 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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CreateApiKey200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_api_key", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_campaign(create_campaign_request, opts = {}) ⇒ CreateCampaign200Response
Create campaign
282 283 284 285 |
# File 'lib/tremendous/api/tremendous_api.rb', line 282 def create_campaign(create_campaign_request, opts = {}) data, _status_code, _headers = create_campaign_with_http_info(create_campaign_request, opts) data end |
#create_campaign_with_http_info(create_campaign_request, opts = {}) ⇒ Array<(CreateCampaign200Response, Integer, Hash)>
Create campaign
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'lib/tremendous/api/tremendous_api.rb', line 291 def create_campaign_with_http_info(create_campaign_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_campaign ...' end # verify the required parameter 'create_campaign_request' is set if @api_client.config.client_side_validation && create_campaign_request.nil? fail ArgumentError, "Missing the required parameter 'create_campaign_request' when calling TremendousApi.create_campaign" end # resource path local_var_path = '/campaigns' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_campaign_request) # return_type return_type = opts[:debug_return_type] || 'CreateCampaign200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_campaign", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_connected_organization(create_connected_organization_request, opts = {}) ⇒ CreateConnectedOrganization200Response
Create connected organization Create a connected organization.
349 350 351 352 |
# File 'lib/tremendous/api/tremendous_api.rb', line 349 def create_connected_organization(create_connected_organization_request, opts = {}) data, _status_code, _headers = create_connected_organization_with_http_info(create_connected_organization_request, opts) data end |
#create_connected_organization_member(create_connected_organization_member_request, opts = {}) ⇒ CreateConnectedOrganizationMember200Response
Create connected organization member Create a connected organization member.
417 418 419 420 |
# File 'lib/tremendous/api/tremendous_api.rb', line 417 def create_connected_organization_member(create_connected_organization_member_request, opts = {}) data, _status_code, _headers = create_connected_organization_member_with_http_info(create_connected_organization_member_request, opts) data end |
#create_connected_organization_member_session(id, create_connected_organization_member_session_request, opts = {}) ⇒ CreateConnectedOrganizationMemberSession200Response
Create connected organization member session Create a connected organization member session.
486 487 488 489 |
# File 'lib/tremendous/api/tremendous_api.rb', line 486 def create_connected_organization_member_session(id, create_connected_organization_member_session_request, opts = {}) data, _status_code, _headers = create_connected_organization_member_session_with_http_info(id, create_connected_organization_member_session_request, opts) data end |
#create_connected_organization_member_session_with_http_info(id, create_connected_organization_member_session_request, opts = {}) ⇒ Array<(CreateConnectedOrganizationMemberSession200Response, Integer, Hash)>
Create connected organization member session Create a connected organization member session.
497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 |
# File 'lib/tremendous/api/tremendous_api.rb', line 497 def create_connected_organization_member_session_with_http_info(id, create_connected_organization_member_session_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_connected_organization_member_session ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.create_connected_organization_member_session" end # verify the required parameter 'create_connected_organization_member_session_request' is set if @api_client.config.client_side_validation && create_connected_organization_member_session_request.nil? fail ArgumentError, "Missing the required parameter 'create_connected_organization_member_session_request' when calling TremendousApi.create_connected_organization_member_session" end # resource path local_var_path = '/connected_organization_members/{id}/sessions'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_connected_organization_member_session_request) # return_type return_type = opts[:debug_return_type] || 'CreateConnectedOrganizationMemberSession200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_connected_organization_member_session", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_connected_organization_member_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_connected_organization_member_with_http_info(create_connected_organization_member_request, opts = {}) ⇒ Array<(CreateConnectedOrganizationMember200Response, Integer, Hash)>
Create connected organization member Create a connected organization member.
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'lib/tremendous/api/tremendous_api.rb', line 427 def create_connected_organization_member_with_http_info(create_connected_organization_member_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_connected_organization_member ...' end # verify the required parameter 'create_connected_organization_member_request' is set if @api_client.config.client_side_validation && create_connected_organization_member_request.nil? fail ArgumentError, "Missing the required parameter 'create_connected_organization_member_request' when calling TremendousApi.create_connected_organization_member" end # resource path local_var_path = '/connected_organization_members' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_connected_organization_member_request) # return_type return_type = opts[:debug_return_type] || 'CreateConnectedOrganizationMember200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_connected_organization_member", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_connected_organization_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_connected_organization_with_http_info(create_connected_organization_request, opts = {}) ⇒ Array<(CreateConnectedOrganization200Response, Integer, Hash)>
Create connected organization Create a connected organization.
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/tremendous/api/tremendous_api.rb', line 359 def create_connected_organization_with_http_info(create_connected_organization_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_connected_organization ...' end # verify the required parameter 'create_connected_organization_request' is set if @api_client.config.client_side_validation && create_connected_organization_request.nil? fail ArgumentError, "Missing the required parameter 'create_connected_organization_request' when calling TremendousApi.create_connected_organization" end # resource path local_var_path = '/connected_organizations' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_connected_organization_request) # return_type return_type = opts[:debug_return_type] || 'CreateConnectedOrganization200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_connected_organization", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_connected_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_field(create_field_request, opts = {}) ⇒ CreateField200Response
Create field Create a custom field to be associated with rewards. Custom fields can be used for reporting and analytics purposes.
559 560 561 562 |
# File 'lib/tremendous/api/tremendous_api.rb', line 559 def create_field(create_field_request, opts = {}) data, _status_code, _headers = create_field_with_http_info(create_field_request, opts) data end |
#create_field_with_http_info(create_field_request, opts = {}) ⇒ Array<(CreateField200Response, Integer, Hash)>
Create field Create a custom field to be associated with rewards. Custom fields can be used for reporting and analytics purposes.
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 |
# File 'lib/tremendous/api/tremendous_api.rb', line 569 def create_field_with_http_info(create_field_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_field ...' end # verify the required parameter 'create_field_request' is set if @api_client.config.client_side_validation && create_field_request.nil? fail ArgumentError, "Missing the required parameter 'create_field_request' when calling TremendousApi.create_field" end # resource path local_var_path = '/fields' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_field_request) # return_type return_type = opts[:debug_return_type] || 'CreateField200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_field", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_invoice(create_invoice_request, opts = {}) ⇒ CreateInvoice200Response
Create invoice 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>
627 628 629 630 |
# File 'lib/tremendous/api/tremendous_api.rb', line 627 def create_invoice(create_invoice_request, opts = {}) data, _status_code, _headers = create_invoice_with_http_info(create_invoice_request, opts) data end |
#create_invoice_with_http_info(create_invoice_request, opts = {}) ⇒ Array<(CreateInvoice200Response, Integer, Hash)>
Create invoice 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>
637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 |
# File 'lib/tremendous/api/tremendous_api.rb', line 637 def create_invoice_with_http_info(create_invoice_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_invoice ...' end # verify the required parameter 'create_invoice_request' is set if @api_client.config.client_side_validation && create_invoice_request.nil? fail ArgumentError, "Missing the required parameter 'create_invoice_request' when calling TremendousApi.create_invoice" end # resource path local_var_path = '/invoices' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_invoice_request) # return_type return_type = opts[:debug_return_type] || 'CreateInvoice200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_invoice", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_member(create_member_request, opts = {}) ⇒ CreateMember200Response
Create member Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have a role that determine their permissions within the organization. Check the Roles API for the available roles. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned ‘invite_url` field in the payload instead.
695 696 697 698 |
# File 'lib/tremendous/api/tremendous_api.rb', line 695 def create_member(create_member_request, opts = {}) data, _status_code, _headers = create_member_with_http_info(create_member_request, opts) data end |
#create_member_with_http_info(create_member_request, opts = {}) ⇒ Array<(CreateMember200Response, Integer, Hash)>
Create member Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have a role that determine their permissions within the organization. Check the Roles API for the available roles. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead.
705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 |
# File 'lib/tremendous/api/tremendous_api.rb', line 705 def create_member_with_http_info(create_member_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_member ...' end # verify the required parameter 'create_member_request' is set if @api_client.config.client_side_validation && create_member_request.nil? fail ArgumentError, "Missing the required parameter 'create_member_request' when calling TremendousApi.create_member" end # resource path local_var_path = '/members' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_member_request) # return_type return_type = opts[:debug_return_type] || 'CreateMember200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_member", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_order(create_order_request, opts = {}) ⇒ CreateOrder200Response
Create order Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style="display: block; margin-top: 20px;" href="/docs/sending-rewards-intro">Check it out!</a></strong> ## 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">external_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, external_id makes order idempotent. All requests that use the same external_id after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a 201 response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by external_id instead of id only.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">payment</code> </div> </td><td><span class="property-type">object</span></td><td></td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">funding_source_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use balance to use your Tremendous's balance.</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">reward</code> </div> </td><td><span class="property-type">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either products or campaign_id must be specified.</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class="object-schema-table-body"> <tr class="property-conditional-hint-response-only"><td><div class="property-name"> <code class="property-name">id</code> </div> </td><td><span class="property-type">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class="property-conditional-hint-response-only"><td><div class="property-name"> <code class="property-name">order_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class="property-conditional-hint-response-only"><td><div class="property-name"> <code class="property-name">created_at</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class="property-conditional-hint-response-only"><td><div class="property-name"> <code class="property-name">expires_at</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date-time</span></td><td><p>Expiration date of the reward. If null, the reward does not expire.</p> </td></tr> <tr class="property-conditional-hint-request-only"><td><div class="property-name"> <code class="property-name">campaign_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class="property-conditional-hint-request-only"><td><div class="property-name"> <code class="property-name">products</code> </div> </td><td><span class="property-type">array</span> <span class="property-format">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a products array will override the products made available by the campaign specified using the campaign_id property unless the products array is empty. It will not override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">value</code> </div> </td><td><span class="property-type">object</span></td><td></td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">denomination</code> </div> </td><td><span class="property-type">number</span> <span class="property-format">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">currency_code</code> </div> </td><td><span class="property-type">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">recipient</code> </div> </td><td><span class="property-type">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">name</code> </div> </td><td><span class="property-type">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">email</code> </div> </td><td><span class="property-type">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">phone</code> </div> </td><td><span class="property-type">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">deliver_at</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">custom_fields</code> </div> </td><td><span class="property-type">array</span></td><td></td></tr> <tr> <td colspan="3"> <details> <summary>Show array item type</summary> <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">id</code> </div> </td><td><span class="property-type">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">value</code> </div> </td><td><span class="property-type">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class="property-conditional-hint-response-only"><td><div class="property-name"> <code class="property-name">label</code> </div> </td><td><span class="property-type">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">language</code> </div> </td><td><span class="property-type">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href="en.wikipedia.org/wiki/List_of_ISO_639-1_codes">ISO-639-1 code</a> for the desired language. Defaults to en.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">delivery</code> </div> </td><td><span class="property-type">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">method</code> </div> </td><td><span class="property-type">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>EMAIL</td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td>LINK</td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td>PHONE</td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">meta</code> </div> </td><td><span class="property-type">object</span></td><td><p>Customizable reward delivery metadata, taking precedence over the related campaign settings.</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">sender_name</code> </div> </td><td><span class="property-type">string</span></td><td><p>The "sender name" used in the delivery. If it's an email reward, "via Tremendous" will be appended to the value. Please note that you cannot customize the sender email.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">subject_line</code> </div> </td><td><span class="property-type">string</span></td><td><p>The subject line used in the delivery.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">message</code> </div> </td><td><span class="property-type">string</span></td><td><p>The content of the message of the reward, shown in the email / SMS and on the landing page.</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a "funding source". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](developers.tremendous.com/reference/list-funding-sources). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](developers.tremendous.com/docs/sandbox-environment). The HTTP status code ‘200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it’s recipient (for delivery method ‘EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same `external_id` are idempotent. Submitting an order with an already existing `external_id` will not create a new order. If the payload is the same as a previously issued order, our API will return a `201` response code, along with a representation of the already-existing order in the response body. If the `external_id` used is for an order with different parameters (e.g. amount, recipient), our API will return a `409` response code, indicating a conflicting resource.
763 764 765 766 |
# File 'lib/tremendous/api/tremendous_api.rb', line 763 def create_order(create_order_request, opts = {}) data, _status_code, _headers = create_order_with_http_info(create_order_request, opts) data end |
#create_order_with_http_info(create_order_request, opts = {}) ⇒ Array<(CreateOrder200Response, Integer, Hash)>
Create order Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style="display: block; margin-top: 20px;" href="/docs/sending-rewards-intro">Check it out!</a></strong> ## 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">external_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">payment</code> </div> </td><td><span class="property-type">object</span></td><td></td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">funding_source_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous&#39;s balance.</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">reward</code> </div> </td><td><span class="property-type">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class="object-schema-table-body"> <tr class="property-conditional-hint-response-only"><td><div class="property-name"> <code class="property-name">id</code> </div> </td><td><span class="property-type">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class="property-conditional-hint-response-only"><td><div class="property-name"> <code class="property-name">order_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class="property-conditional-hint-response-only"><td><div class="property-name"> <code class="property-name">created_at</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class="property-conditional-hint-response-only"><td><div class="property-name"> <code class="property-name">expires_at</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date-time</span></td><td><p>Expiration date of the reward. If null, the reward does not expire.</p> </td></tr> <tr class="property-conditional-hint-request-only"><td><div class="property-name"> <code class="property-name">campaign_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class="property-conditional-hint-request-only"><td><div class="property-name"> <code class="property-name">products</code> </div> </td><td><span class="property-type">array</span> <span class="property-format">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">value</code> </div> </td><td><span class="property-type">object</span></td><td></td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">denomination</code> </div> </td><td><span class="property-type">number</span> <span class="property-format">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">currency_code</code> </div> </td><td><span class="property-type">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">recipient</code> </div> </td><td><span class="property-type">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">name</code> </div> </td><td><span class="property-type">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">email</code> </div> </td><td><span class="property-type">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">phone</code> </div> </td><td><span class="property-type">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">deliver_at</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">custom_fields</code> </div> </td><td><span class="property-type">array</span></td><td></td></tr> <tr> <td colspan="3"> <details> <summary>Show array item type</summary> <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">id</code> </div> </td><td><span class="property-type">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">value</code> </div> </td><td><span class="property-type">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class="property-conditional-hint-response-only"><td><div class="property-name"> <code class="property-name">label</code> </div> </td><td><span class="property-type">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">language</code> </div> </td><td><span class="property-type">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href="en.wikipedia.org/wiki/List_of_ISO_639-1_codes">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">delivery</code> </div> </td><td><span class="property-type">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">method</code> </div> </td><td><span class="property-type">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/id</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">meta</code> </div> </td><td><span class="property-type">object</span></td><td><p>Customizable reward delivery metadata, taking precedence over the related campaign settings.</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">sender_name</code> </div> </td><td><span class="property-type">string</span></td><td><p>The &quot;sender name&quot; used in the delivery. If it&#39;s an email reward, &quot;via Tremendous&quot; will be appended to the value. Please note that you cannot customize the sender email.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">subject_line</code> </div> </td><td><span class="property-type">string</span></td><td><p>The subject line used in the delivery.</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">message</code> </div> </td><td><span class="property-type">string</span></td><td><p>The content of the message of the reward, shown in the email / SMS and on the landing page.</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a "funding source". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](developers.tremendous.com/reference/list-funding-sources). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](developers.tremendous.com/docs/sandbox-environment). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it's recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same `external_id` are idempotent. Submitting an order with an already existing `external_id` will not create a new order. If the payload is the same as a previously issued order, our API will return a `201` response code, along with a representation of the already-existing order in the response body. If the `external_id` used is for an order with different parameters (e.g. amount, recipient), our API will return a `409` response code, indicating a conflicting resource.
773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 |
# File 'lib/tremendous/api/tremendous_api.rb', line 773 def create_order_with_http_info(create_order_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_order ...' end # verify the required parameter 'create_order_request' is set if @api_client.config.client_side_validation && create_order_request.nil? fail ArgumentError, "Missing the required parameter 'create_order_request' when calling TremendousApi.create_order" end # resource path local_var_path = '/orders' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_order_request) # return_type return_type = opts[:debug_return_type] || 'CreateOrder200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_order", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_organization(create_organization_request, opts = {}) ⇒ CreateOrganization200Response
Create organization Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass ‘with_api_key` or `copy_settings` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard.
831 832 833 834 |
# File 'lib/tremendous/api/tremendous_api.rb', line 831 def create_organization(create_organization_request, opts = {}) data, _status_code, _headers = create_organization_with_http_info(create_organization_request, opts) data end |
#create_organization_with_http_info(create_organization_request, opts = {}) ⇒ Array<(CreateOrganization200Response, Integer, Hash)>
Create organization Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard.
841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 |
# File 'lib/tremendous/api/tremendous_api.rb', line 841 def create_organization_with_http_info(create_organization_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_organization ...' end # verify the required parameter 'create_organization_request' is set if @api_client.config.client_side_validation && create_organization_request.nil? fail ArgumentError, "Missing the required parameter 'create_organization_request' when calling TremendousApi.create_organization" end # resource path local_var_path = '/organizations' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization_request) # return_type return_type = opts[:debug_return_type] || 'CreateOrganization200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_organization", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_report(create_report_request, opts = {}) ⇒ CreateReport200Response
Create report Creating a report allows your organization to programmatically retrieve information that’s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll ‘/api/v2/reports/id` or listen for REPORTS webhook event. ## 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">report_type</code> </div> </td><td><span class="property-type">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>digital_rewards</td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">format</code> </div> </td><td><span class="property-type">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>csv</td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">filters</code> </div> </td><td><span class="property-type">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">digital_rewards</code> </div> </td><td><span class="property-type">object</span></td><td><p>Filters object for a report_type: digital_rewards report</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">amount</code> </div> </td><td><span class="property-type">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">gte</code> </div> </td><td><span class="property-type">number</span> <span class="property-format">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">lte</code> </div> </td><td><span class="property-type">number</span> <span class="property-format">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">campaign_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">created_at</code> </div> </td><td><span class="property-type">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">gte</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">lte</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">delivered_at</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">delivery_method</code> </div> </td><td><span class="property-type">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">order_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">order_status</code> </div> </td><td><span class="property-type">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">status</code> </div> </td><td><span class="property-type">array</span> <span class="property-format">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simultaneously generated by an organization at a given time. If you exceed the rate limit, you’ll receive a ‘429` response.
899 900 901 902 |
# File 'lib/tremendous/api/tremendous_api.rb', line 899 def create_report(create_report_request, opts = {}) data, _status_code, _headers = create_report_with_http_info(create_report_request, opts) data end |
#create_report_with_http_info(create_report_request, opts = {}) ⇒ Array<(CreateReport200Response, Integer, Hash)>
Create report Creating a report allows your organization to programmatically retrieve information that's available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/id` or listen for REPORTS webhook event. ## 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">report_type</code> </div> </td><td><span class="property-type">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">format</code> </div> </td><td><span class="property-type">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">filters</code> </div> </td><td><span class="property-type">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">digital_rewards</code> </div> </td><td><span class="property-type">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">amount</code> </div> </td><td><span class="property-type">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">gte</code> </div> </td><td><span class="property-type">number</span> <span class="property-format">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">lte</code> </div> </td><td><span class="property-type">number</span> <span class="property-format">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">campaign_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">created_at</code> </div> </td><td><span class="property-type">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan="3"> <details> <summary>Show object properties</summary> <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">gte</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">lte</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=""><td><div class="property-name"> <code class="property-name">delivered_at</code> </div> </td><td><span class="property-type">string</span> <span class="property-format">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">delivery_method</code> </div> </td><td><span class="property-type">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">order_id</code> </div> </td><td><span class="property-type">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">order_status</code> </div> </td><td><span class="property-type">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=""><td><div class="property-name"> <code class="property-name">status</code> </div> </td><td><span class="property-type">array</span> <span class="property-format">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simultaneously generated by an organization at a given time. If you exceed the rate limit, you'll receive a `429` response.
909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 |
# File 'lib/tremendous/api/tremendous_api.rb', line 909 def create_report_with_http_info(create_report_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_report ...' end # verify the required parameter 'create_report_request' is set if @api_client.config.client_side_validation && create_report_request.nil? fail ArgumentError, "Missing the required parameter 'create_report_request' when calling TremendousApi.create_report" end # resource path local_var_path = '/reports' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_report_request) # return_type return_type = opts[:debug_return_type] || 'CreateReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_report", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_topup(opts = {}) ⇒ CreateTopup200Response
Create a topup
966 967 968 969 |
# File 'lib/tremendous/api/tremendous_api.rb', line 966 def create_topup(opts = {}) data, _status_code, _headers = create_topup_with_http_info(opts) data end |
#create_topup_with_http_info(opts = {}) ⇒ Array<(CreateTopup200Response, Integer, Hash)>
Create a topup
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 |
# File 'lib/tremendous/api/tremendous_api.rb', line 975 def create_topup_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_topup ...' end # resource path local_var_path = '/topups' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_topup_request']) # return_type return_type = opts[:debug_return_type] || 'CreateTopup200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_topup", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_topup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_webhook(create_webhook_request, opts = {}) ⇒ CreateWebhook200Response
Create webhook 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>
1029 1030 1031 1032 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1029 def create_webhook(create_webhook_request, opts = {}) data, _status_code, _headers = create_webhook_with_http_info(create_webhook_request, opts) data end |
#create_webhook_with_http_info(create_webhook_request, opts = {}) ⇒ Array<(CreateWebhook200Response, Integer, Hash)>
Create webhook 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>
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1039 def create_webhook_with_http_info(create_webhook_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.create_webhook ...' end # verify the required parameter 'create_webhook_request' is set if @api_client.config.client_side_validation && create_webhook_request.nil? fail ArgumentError, "Missing the required parameter 'create_webhook_request' when calling TremendousApi.create_webhook" end # resource path local_var_path = '/webhooks' # 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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_webhook_request) # return_type return_type = opts[:debug_return_type] || 'CreateWebhook200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.create_webhook", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_fraud_rule(rule_type, opts = {}) ⇒ DeleteFraudRule200Response
Delete fraud rule Deletes the rule of the type passed in the URL.
1097 1098 1099 1100 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1097 def delete_fraud_rule(rule_type, opts = {}) data, _status_code, _headers = delete_fraud_rule_with_http_info(rule_type, opts) data end |
#delete_fraud_rule_with_http_info(rule_type, opts = {}) ⇒ Array<(DeleteFraudRule200Response, Integer, Hash)>
Delete fraud rule Deletes the rule of the type passed in the URL.
1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1107 def delete_fraud_rule_with_http_info(rule_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.delete_fraud_rule ...' end # verify the required parameter 'rule_type' is set if @api_client.config.client_side_validation && rule_type.nil? fail ArgumentError, "Missing the required parameter 'rule_type' when calling TremendousApi.delete_fraud_rule" end # verify enum value allowable_values = ["review_country", "review_ip", "review_email", "review_redeemed_rewards_count", "review_redeemed_rewards_amount", "review_multiple_emails", "review_vpn", "review_tremendous_flag_list", "review_previously_blocked_recipients", "allow_ip", "allow_email"] if @api_client.config.client_side_validation && !allowable_values.include?(rule_type) fail ArgumentError, "invalid value for \"rule_type\", must be one of #{allowable_values}" end # resource path local_var_path = '/fraud_rules/{rule_type}'.sub('{' + 'rule_type' + '}', CGI.escape(rule_type.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeleteFraudRule200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.delete_fraud_rule", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#delete_fraud_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_invoices(id, opts = {}) ⇒ CreateInvoice200Response
Delete invoice Removes an invoice. This has no further consequences but is a rather cosmetic operation.
1165 1166 1167 1168 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1165 def delete_invoices(id, opts = {}) data, _status_code, _headers = delete_invoices_with_http_info(id, opts) data end |
#delete_invoices_with_http_info(id, opts = {}) ⇒ Array<(CreateInvoice200Response, Integer, Hash)>
Delete invoice Removes an invoice. This has no further consequences but is a rather cosmetic operation.
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1175 def delete_invoices_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.delete_invoices ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.delete_invoices" end # resource path local_var_path = '/invoices/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CreateInvoice200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.delete_invoices", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#delete_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_webhook(id, opts = {}) ⇒ nil
Delete webhook > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
1228 1229 1230 1231 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1228 def delete_webhook(id, opts = {}) delete_webhook_with_http_info(id, opts) nil end |
#delete_webhook_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete webhook > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1238 def delete_webhook_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.delete_webhook ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.delete_webhook" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.delete_webhook, must conform to the pattern #{pattern}." end # resource path local_var_path = '/webhooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.delete_webhook", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#download_invoice_csv(id, opts = {}) ⇒ String
Retrieve invoice as CSV Generates a CSV version for an invoice listing the associated rewards and orders
1296 1297 1298 1299 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1296 def download_invoice_csv(id, opts = {}) data, _status_code, _headers = download_invoice_csv_with_http_info(id, opts) data end |
#download_invoice_csv_with_http_info(id, opts = {}) ⇒ Array<(String, Integer, Hash)>
Retrieve invoice as CSV Generates a CSV version for an invoice listing the associated rewards and orders
1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1306 def download_invoice_csv_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.download_invoice_csv ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.download_invoice_csv" end # resource path local_var_path = '/invoices/{id}/csv'.sub('{' + 'id' + '}', CGI.escape(id.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(['text/csv', 'application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.download_invoice_csv", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#download_invoice_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#download_invoice_pdf(id, opts = {}) ⇒ File
Retrieve invoice as PDF Generates a PDF version for an invoice
1359 1360 1361 1362 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1359 def download_invoice_pdf(id, opts = {}) data, _status_code, _headers = download_invoice_pdf_with_http_info(id, opts) data end |
#download_invoice_pdf_with_http_info(id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Retrieve invoice as PDF Generates a PDF version for an invoice
1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1369 def download_invoice_pdf_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.download_invoice_pdf ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.download_invoice_pdf" end # resource path local_var_path = '/invoices/{id}/pdf'.sub('{' + 'id' + '}', CGI.escape(id.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/pdf', 'application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.download_invoice_pdf", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#download_invoice_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#fraud_rule(rule_type, opts = {}) ⇒ FraudRule200Response
Configure fraud rule Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten.
1423 1424 1425 1426 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1423 def fraud_rule(rule_type, opts = {}) data, _status_code, _headers = fraud_rule_with_http_info(rule_type, opts) data end |
#fraud_rule_with_http_info(rule_type, opts = {}) ⇒ Array<(FraudRule200Response, Integer, Hash)>
Configure fraud rule Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten.
1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1434 def fraud_rule_with_http_info(rule_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.fraud_rule ...' end # verify the required parameter 'rule_type' is set if @api_client.config.client_side_validation && rule_type.nil? fail ArgumentError, "Missing the required parameter 'rule_type' when calling TremendousApi.fraud_rule" end # verify enum value allowable_values = ["review_country", "review_ip", "review_email", "review_redeemed_rewards_count", "review_redeemed_rewards_amount", "review_multiple_emails", "review_vpn", "review_tremendous_flag_list", "review_previously_blocked_recipients", "allow_ip", "allow_email"] if @api_client.config.client_side_validation && !allowable_values.include?(rule_type) fail ArgumentError, "invalid value for \"rule_type\", must be one of #{allowable_values}" end # resource path local_var_path = '/fraud_rules/{rule_type}'.sub('{' + 'rule_type' + '}', CGI.escape(rule_type.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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'fraud_rule_request']) # return_type return_type = opts[:debug_return_type] || 'FraudRule200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.fraud_rule", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#fraud_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#generate_reward_link(id, opts = {}) ⇒ GenerateRewardLink200Response
Generate a reward URL Generate a redemption link for the reward identified by the ‘id` in the URL
1497 1498 1499 1500 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1497 def generate_reward_link(id, opts = {}) data, _status_code, _headers = generate_reward_link_with_http_info(id, opts) data end |
#generate_reward_link_with_http_info(id, opts = {}) ⇒ Array<(GenerateRewardLink200Response, Integer, Hash)>
Generate a reward URL Generate a redemption link for the reward identified by the `id` in the URL
1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1507 def generate_reward_link_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.generate_reward_link ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.generate_reward_link" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.generate_reward_link, must conform to the pattern #{pattern}." end # resource path local_var_path = '/rewards/{id}/generate_link'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GenerateRewardLink200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.generate_reward_link", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#generate_reward_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_campaign(id, opts = {}) ⇒ CreateCampaign200Response
Retrieve campaign Retrieve a campaign, identified by the given ‘id` in the URL
1565 1566 1567 1568 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1565 def get_campaign(id, opts = {}) data, _status_code, _headers = get_campaign_with_http_info(id, opts) data end |
#get_campaign_with_http_info(id, opts = {}) ⇒ Array<(CreateCampaign200Response, Integer, Hash)>
Retrieve campaign Retrieve a campaign, identified by the given `id` in the URL
1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1575 def get_campaign_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_campaign ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_campaign" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_campaign, must conform to the pattern #{pattern}." end # resource path local_var_path = '/campaigns/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CreateCampaign200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_campaign", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_connected_organization(id, opts = {}) ⇒ CreateConnectedOrganization200Response
Retrieve a connected organization Retrieve the connected organization, identified by the given ‘id` in the URL
1633 1634 1635 1636 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1633 def get_connected_organization(id, opts = {}) data, _status_code, _headers = get_connected_organization_with_http_info(id, opts) data end |
#get_connected_organization_member(id, opts = {}) ⇒ CreateConnectedOrganizationMember200Response
Retrieve a connected organization member Retrieve the connected organization member, identified by the given ‘id` in the URL
1696 1697 1698 1699 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1696 def get_connected_organization_member(id, opts = {}) data, _status_code, _headers = get_connected_organization_member_with_http_info(id, opts) data end |
#get_connected_organization_member_with_http_info(id, opts = {}) ⇒ Array<(CreateConnectedOrganizationMember200Response, Integer, Hash)>
Retrieve a connected organization member Retrieve the connected organization member, identified by the given `id` in the URL
1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1706 def get_connected_organization_member_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_connected_organization_member ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_connected_organization_member" end # resource path local_var_path = '/connected_organization_members/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CreateConnectedOrganizationMember200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_connected_organization_member", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_connected_organization_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_connected_organization_with_http_info(id, opts = {}) ⇒ Array<(CreateConnectedOrganization200Response, Integer, Hash)>
Retrieve a connected organization Retrieve the connected organization, identified by the given `id` in the URL
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1643 def get_connected_organization_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_connected_organization ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_connected_organization" end # resource path local_var_path = '/connected_organizations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CreateConnectedOrganization200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_connected_organization", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_connected_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fraud_review(id, opts = {}) ⇒ GetFraudReview200Response
Retrieve single fraud review Retrieve the details of a fraud review, identified by the given ‘id` in the URL. Returns additional details regarding the fraud review beyond what’s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc.
1759 1760 1761 1762 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1759 def get_fraud_review(id, opts = {}) data, _status_code, _headers = get_fraud_review_with_http_info(id, opts) data end |
#get_fraud_review_with_http_info(id, opts = {}) ⇒ Array<(GetFraudReview200Response, Integer, Hash)>
Retrieve single fraud review Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what's provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc.
1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1769 def get_fraud_review_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_fraud_review ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_fraud_review" end # resource path local_var_path = '/fraud_reviews/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetFraudReview200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_fraud_review", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_fraud_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_funding_source(id, opts = {}) ⇒ GetFundingSource200Response
Retrieve funding source 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.
1822 1823 1824 1825 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1822 def get_funding_source(id, opts = {}) data, _status_code, _headers = get_funding_source_with_http_info(id, opts) data end |
#get_funding_source_with_http_info(id, opts = {}) ⇒ Array<(GetFundingSource200Response, Integer, Hash)>
Retrieve funding source 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.
1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1832 def get_funding_source_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_funding_source ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_funding_source" end pattern = Regexp.new(/^([A-Z0-9]{4,20}|[Bb][Aa][Ll][Aa][Nn][Cc][Ee])$/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_funding_source, must conform to the pattern #{pattern}." end # resource path local_var_path = '/funding_sources/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetFundingSource200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_funding_source", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_funding_source\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_invoice(id, opts = {}) ⇒ CreateInvoice200Response
Retrieve invoice Retrieve an invoice, identified by the given ‘id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits.
1890 1891 1892 1893 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1890 def get_invoice(id, opts = {}) data, _status_code, _headers = get_invoice_with_http_info(id, opts) data end |
#get_invoice_with_http_info(id, opts = {}) ⇒ Array<(CreateInvoice200Response, Integer, Hash)>
Retrieve invoice Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits.
1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1900 def get_invoice_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_invoice ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_invoice" end # resource path local_var_path = '/invoices/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CreateInvoice200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_invoice", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_member(id, opts = {}) ⇒ GetMember200Response
Retrieve member
1952 1953 1954 1955 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1952 def get_member(id, opts = {}) data, _status_code, _headers = get_member_with_http_info(id, opts) data end |
#get_member_with_http_info(id, opts = {}) ⇒ Array<(GetMember200Response, Integer, Hash)>
Retrieve member
1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 |
# File 'lib/tremendous/api/tremendous_api.rb', line 1961 def get_member_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_member ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_member" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_member, must conform to the pattern #{pattern}." end # resource path local_var_path = '/members/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetMember200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_member", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_order(id, opts = {}) ⇒ GetOrder200Response
Retrieve order Retrieve the order, identified by the given ‘id` in the URL
2019 2020 2021 2022 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2019 def get_order(id, opts = {}) data, _status_code, _headers = get_order_with_http_info(id, opts) data end |
#get_order_with_http_info(id, opts = {}) ⇒ Array<(GetOrder200Response, Integer, Hash)>
Retrieve order Retrieve the order, identified by the given `id` in the URL
2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2029 def get_order_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_order ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_order" end # resource path local_var_path = '/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetOrder200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_order", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_organization(id, opts = {}) ⇒ GetOrganization200Response
Retrieve organization
2081 2082 2083 2084 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2081 def get_organization(id, opts = {}) data, _status_code, _headers = get_organization_with_http_info(id, opts) data end |
#get_organization_with_http_info(id, opts = {}) ⇒ Array<(GetOrganization200Response, Integer, Hash)>
Retrieve organization
2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2090 def get_organization_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_organization ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_organization" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_organization, must conform to the pattern #{pattern}." end # resource path local_var_path = '/organizations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetOrganization200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_organization", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_product(id, opts = {}) ⇒ GetProductResponse
Retrieve product Retrieve a product, identified by the given ‘id` in the URL
2148 2149 2150 2151 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2148 def get_product(id, opts = {}) data, _status_code, _headers = get_product_with_http_info(id, opts) data end |
#get_product_with_http_info(id, opts = {}) ⇒ Array<(GetProductResponse, Integer, Hash)>
Retrieve product Retrieve a product, identified by the given `id` in the URL
2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2158 def get_product_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_product ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_product" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_product, must conform to the pattern #{pattern}." end # resource path local_var_path = '/products/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetProductResponse' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_product", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_report(id, opts = {}) ⇒ CreateReport200Response
Retrieve report Retrieve the report, identified by the given ‘id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL. Returns the report’s current status and, if available, the URL for download. The URL is valid for 7 days.
2216 2217 2218 2219 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2216 def get_report(id, opts = {}) data, _status_code, _headers = get_report_with_http_info(id, opts) data end |
#get_report_with_http_info(id, opts = {}) ⇒ Array<(CreateReport200Response, Integer, Hash)>
Retrieve report Retrieve the report, identified by the given `id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL. Returns the report’s current status and, if available, the URL for download. The URL is valid for 7 days.
2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2226 def get_report_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_report ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_report" end # resource path local_var_path = '/reports/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CreateReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_report", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_reward(id, opts = {}) ⇒ GetReward200Response
Retrieve single reward Retrieve the reward, identified by the given ‘id` in the URL
2279 2280 2281 2282 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2279 def get_reward(id, opts = {}) data, _status_code, _headers = get_reward_with_http_info(id, opts) data end |
#get_reward_with_http_info(id, opts = {}) ⇒ Array<(GetReward200Response, Integer, Hash)>
Retrieve single reward Retrieve the reward, identified by the given `id` in the URL
2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2289 def get_reward_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_reward ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_reward" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_reward, must conform to the pattern #{pattern}." end # resource path local_var_path = '/rewards/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetReward200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_reward", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_reward\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_topup(id, opts = {}) ⇒ CreateTopup200Response
Retrieve single topup Retrieve a topup, identified by the given ‘id` in the URL.
2347 2348 2349 2350 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2347 def get_topup(id, opts = {}) data, _status_code, _headers = get_topup_with_http_info(id, opts) data end |
#get_topup_with_http_info(id, opts = {}) ⇒ Array<(CreateTopup200Response, Integer, Hash)>
Retrieve single topup Retrieve a topup, identified by the given `id` in the URL.
2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2357 def get_topup_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_topup ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_topup" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_topup, must conform to the pattern #{pattern}." end # resource path local_var_path = '/topups/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CreateTopup200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_topup", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_topup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_webhook(id, opts = {}) ⇒ CreateWebhook200Response
Retrieve webhook > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
2415 2416 2417 2418 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2415 def get_webhook(id, opts = {}) data, _status_code, _headers = get_webhook_with_http_info(id, opts) data end |
#get_webhook_with_http_info(id, opts = {}) ⇒ Array<(CreateWebhook200Response, Integer, Hash)>
Retrieve webhook > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2425 def get_webhook_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.get_webhook ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_webhook" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_webhook, must conform to the pattern #{pattern}." end # resource path local_var_path = '/webhooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CreateWebhook200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.get_webhook", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#get_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_balance_transactions(opts = {}) ⇒ ListBalanceTransactions200Response
List balance transactions Fetch a list of all balance transactions on your account.
2486 2487 2488 2489 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2486 def list_balance_transactions(opts = {}) data, _status_code, _headers = list_balance_transactions_with_http_info(opts) data end |
#list_balance_transactions_with_http_info(opts = {}) ⇒ Array<(ListBalanceTransactions200Response, Integer, Hash)>
List balance transactions Fetch a list of all balance transactions on your account.
2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2499 def list_balance_transactions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_balance_transactions ...' end # resource path local_var_path = '/balance_transactions' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'created_at[gte]'] = opts[:'created_at_gte'] if !opts[:'created_at_gte'].nil? query_params[:'created_at[lte]'] = opts[:'created_at_lte'] if !opts[:'created_at_lte'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListBalanceTransactions200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_balance_transactions", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_balance_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_campaigns(opts = {}) ⇒ ListCampaigns200Response
List campaigns Retrieve a list of all campaigns created in your account
2551 2552 2553 2554 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2551 def list_campaigns(opts = {}) data, _status_code, _headers = list_campaigns_with_http_info(opts) data end |
#list_campaigns_with_http_info(opts = {}) ⇒ Array<(ListCampaigns200Response, Integer, Hash)>
List campaigns Retrieve a list of all campaigns created in your account
2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2560 def list_campaigns_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_campaigns ...' end # resource path local_var_path = '/campaigns' # 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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListCampaigns200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_campaigns", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_connected_organization_members(connected_organization_id, opts = {}) ⇒ ListConnectedOrganizationMembers200Response
List connected organization members Retrieve a list of connected organization members.
2611 2612 2613 2614 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2611 def list_connected_organization_members(connected_organization_id, opts = {}) data, _status_code, _headers = list_connected_organization_members_with_http_info(connected_organization_id, opts) data end |
#list_connected_organization_members_with_http_info(connected_organization_id, opts = {}) ⇒ Array<(ListConnectedOrganizationMembers200Response, Integer, Hash)>
List connected organization members Retrieve a list of connected organization members.
2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2623 def list_connected_organization_members_with_http_info(connected_organization_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_connected_organization_members ...' end # verify the required parameter 'connected_organization_id' is set if @api_client.config.client_side_validation && connected_organization_id.nil? fail ArgumentError, "Missing the required parameter 'connected_organization_id' when calling TremendousApi.list_connected_organization_members" end # resource path local_var_path = '/connected_organization_members' # query parameters query_params = opts[:query_params] || {} query_params[:'connected_organization_id'] = connected_organization_id query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListConnectedOrganizationMembers200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_connected_organization_members", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_connected_organization_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_connected_organizations(opts = {}) ⇒ ListConnectedOrganizations200Response
List connected organizations Retrieve a list of connected organizations.
2680 2681 2682 2683 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2680 def list_connected_organizations(opts = {}) data, _status_code, _headers = list_connected_organizations_with_http_info(opts) data end |
#list_connected_organizations_with_http_info(opts = {}) ⇒ Array<(ListConnectedOrganizations200Response, Integer, Hash)>
List connected organizations Retrieve a list of connected organizations.
2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2691 def list_connected_organizations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_connected_organizations ...' end # resource path local_var_path = '/connected_organizations' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListConnectedOrganizations200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_connected_organizations", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_connected_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_fields(opts = {}) ⇒ ListFields200Response
List fields For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard.
2741 2742 2743 2744 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2741 def list_fields(opts = {}) data, _status_code, _headers = list_fields_with_http_info(opts) data end |
#list_fields_with_http_info(opts = {}) ⇒ Array<(ListFields200Response, Integer, Hash)>
List fields For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard.
2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2750 def list_fields_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_fields ...' end # resource path local_var_path = '/fields' # 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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListFields200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_fields", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_forex(opts = {}) ⇒ ListForexResponse
List exchange rates Retrieve a list of exchange rates
2799 2800 2801 2802 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2799 def list_forex(opts = {}) data, _status_code, _headers = list_forex_with_http_info(opts) data end |
#list_forex_with_http_info(opts = {}) ⇒ Array<(ListForexResponse, Integer, Hash)>
List exchange rates Retrieve a list of exchange rates
2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2809 def list_forex_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_forex ...' end # resource path local_var_path = '/forex' # query parameters query_params = opts[:query_params] || {} query_params[:'base'] = opts[:'base'] if !opts[:'base'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListForexResponse' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_forex", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_forex\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_fraud_reviews(opts = {}) ⇒ ListFraudReviews200Response
List fraud reviews Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates.
2865 2866 2867 2868 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2865 def list_fraud_reviews(opts = {}) data, _status_code, _headers = list_fraud_reviews_with_http_info(opts) data end |
#list_fraud_reviews_with_http_info(opts = {}) ⇒ Array<(ListFraudReviews200Response, Integer, Hash)>
List fraud reviews Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates.
2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2881 def list_fraud_reviews_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_fraud_reviews ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling TremendousApi.list_fraud_reviews, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TremendousApi.list_fraud_reviews, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TremendousApi.list_fraud_reviews, must be greater than or equal to 1.' end allowable_values = ["flagged", "blocked", "released"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end # resource path local_var_path = '/fraud_reviews' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'created_at[gte]'] = opts[:'created_at_gte'] if !opts[:'created_at_gte'].nil? query_params[:'created_at[lte]'] = opts[:'created_at_lte'] if !opts[:'created_at_lte'].nil? query_params[:'redeemed_at[gte]'] = opts[:'redeemed_at_gte'] if !opts[:'redeemed_at_gte'].nil? query_params[:'redeemed_at[lte]'] = opts[:'redeemed_at_lte'] if !opts[:'redeemed_at_lte'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListFraudReviews200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_fraud_reviews", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_fraud_reviews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_fraud_rules(opts = {}) ⇒ ListFraudRules200Response
List fraud rules List active fraud rules associated with the organization tied to your API key.
2952 2953 2954 2955 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2952 def list_fraud_rules(opts = {}) data, _status_code, _headers = list_fraud_rules_with_http_info(opts) data end |
#list_fraud_rules_with_http_info(opts = {}) ⇒ Array<(ListFraudRules200Response, Integer, Hash)>
List fraud rules List active fraud rules associated with the organization tied to your API key.
2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 |
# File 'lib/tremendous/api/tremendous_api.rb', line 2961 def list_fraud_rules_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_fraud_rules ...' end # resource path local_var_path = '/fraud_rules' # 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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListFraudRules200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_fraud_rules", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_fraud_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_funding_sources(opts = {}) ⇒ ListFundingSources200Response
List funding sources Retrieve a list of all funding sources in your organization’s account.
3009 3010 3011 3012 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3009 def list_funding_sources(opts = {}) data, _status_code, _headers = list_funding_sources_with_http_info(opts) data end |
#list_funding_sources_with_http_info(opts = {}) ⇒ Array<(ListFundingSources200Response, Integer, Hash)>
List funding sources Retrieve a list of all funding sources in your organization's account.
3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3018 def list_funding_sources_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_funding_sources ...' end # resource path local_var_path = '/funding_sources' # 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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListFundingSources200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_funding_sources", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_funding_sources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_invoices(opts = {}) ⇒ ListInvoices200Response
List invoices Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices.
3068 3069 3070 3071 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3068 def list_invoices(opts = {}) data, _status_code, _headers = list_invoices_with_http_info(opts) data end |
#list_invoices_with_http_info(opts = {}) ⇒ Array<(ListInvoices200Response, Integer, Hash)>
List invoices Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices.
3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3079 def list_invoices_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_invoices ...' end # resource path local_var_path = '/invoices' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListInvoices200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_invoices", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_members(opts = {}) ⇒ ListMembers200Response
List members To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request.
3129 3130 3131 3132 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3129 def list_members(opts = {}) data, _status_code, _headers = list_members_with_http_info(opts) data end |
#list_members_with_http_info(opts = {}) ⇒ Array<(ListMembers200Response, Integer, Hash)>
List members To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request.
3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3138 def list_members_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_members ...' end # resource path local_var_path = '/members' # 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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListMembers200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_members", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_orders(opts = {}) ⇒ ListOrders200Response
List orders Retrieve a list of orders
3192 3193 3194 3195 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3192 def list_orders(opts = {}) data, _status_code, _headers = list_orders_with_http_info(opts) data end |
#list_orders_with_http_info(opts = {}) ⇒ Array<(ListOrders200Response, Integer, Hash)>
List orders Retrieve a list of orders
3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3207 def list_orders_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_orders ...' end # resource path local_var_path = '/orders' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil? query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil? query_params[:'created_at[gte]'] = opts[:'created_at_gte'] if !opts[:'created_at_gte'].nil? query_params[:'created_at[lte]'] = opts[:'created_at_lte'] if !opts[:'created_at_lte'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListOrders200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_orders", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_organizations(opts = {}) ⇒ ListOrganizations200Response
List organizations The returned list only includes the organization to which the API key belongs to, that is used for the request.
3261 3262 3263 3264 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3261 def list_organizations(opts = {}) data, _status_code, _headers = list_organizations_with_http_info(opts) data end |
#list_organizations_with_http_info(opts = {}) ⇒ Array<(ListOrganizations200Response, Integer, Hash)>
List organizations The returned list only includes the organization to which the API key belongs to, that is used for the request.
3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3270 def list_organizations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_organizations ...' end # resource path local_var_path = '/organizations' # 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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListOrganizations200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_organizations", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_products(opts = {}) ⇒ ListProductsResponse
List products Retrieve a list of available products
3321 3322 3323 3324 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3321 def list_products(opts = {}) data, _status_code, _headers = list_products_with_http_info(opts) data end |
#list_products_with_http_info(opts = {}) ⇒ Array<(ListProductsResponse, Integer, Hash)>
List products Retrieve a list of available products
3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3333 def list_products_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_products ...' end # resource path local_var_path = '/products' # query parameters query_params = opts[:query_params] || {} query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil? query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil? query_params[:'subcategory'] = opts[:'subcategory'] if !opts[:'subcategory'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListProductsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_products", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_rewards(opts = {}) ⇒ ListRewards200Response
List rewards 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](developers.tremendous.com/docs/using-custom-fields-to-add-custom-data-to-rewards#querying-by-custom-fields)
3386 3387 3388 3389 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3386 def list_rewards(opts = {}) data, _status_code, _headers = list_rewards_with_http_info(opts) data end |
#list_rewards_with_http_info(opts = {}) ⇒ Array<(ListRewards200Response, Integer, Hash)>
List rewards 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](developers.tremendous.com/docs/using-custom-fields-to-add-custom-data-to-rewards#querying-by-custom-fields)
3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3397 def list_rewards_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_rewards ...' end # resource path local_var_path = '/rewards' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListRewards200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_rewards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_roles(opts = {}) ⇒ ListRoles200Response
List roles List all available roles in the organization.
3447 3448 3449 3450 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3447 def list_roles(opts = {}) data, _status_code, _headers = list_roles_with_http_info(opts) data end |
#list_roles_with_http_info(opts = {}) ⇒ Array<(ListRoles200Response, Integer, Hash)>
List roles List all available roles in the organization.
3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3456 def list_roles_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_roles ...' end # resource path local_var_path = '/roles' # 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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListRoles200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_roles", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_topups(opts = {}) ⇒ ListTopups200Response
List topups Retrieve a list of all topup requests.
3505 3506 3507 3508 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3505 def list_topups(opts = {}) data, _status_code, _headers = list_topups_with_http_info(opts) data end |
#list_topups_with_http_info(opts = {}) ⇒ Array<(ListTopups200Response, Integer, Hash)>
List topups Retrieve a list of all topup requests.
3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3515 def list_topups_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_topups ...' end # resource path local_var_path = '/topups' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListTopups200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_topups", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_topups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_webhook_events(id, opts = {}) ⇒ ListWebhookEvents200Response
List events 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)
3565 3566 3567 3568 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3565 def list_webhook_events(id, opts = {}) data, _status_code, _headers = list_webhook_events_with_http_info(id, opts) data end |
#list_webhook_events_with_http_info(id, opts = {}) ⇒ Array<(ListWebhookEvents200Response, Integer, Hash)>
List events 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)
3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3575 def list_webhook_events_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_webhook_events ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.list_webhook_events" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.list_webhook_events, must conform to the pattern #{pattern}." end # resource path local_var_path = '/webhooks/{id}/events'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListWebhookEvents200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_webhook_events", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_webhook_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_webhooks(opts = {}) ⇒ ListWebhooks200Response
List webhooks Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3632 3633 3634 3635 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3632 def list_webhooks(opts = {}) data, _status_code, _headers = list_webhooks_with_http_info(opts) data end |
#list_webhooks_with_http_info(opts = {}) ⇒ Array<(ListWebhooks200Response, Integer, Hash)>
List webhooks Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3641 def list_webhooks_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.list_webhooks ...' end # resource path local_var_path = '/webhooks' # 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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListWebhooks200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.list_webhooks", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#list_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reject_order(id, opts = {}) ⇒ GetOrder200Response
Reject order Rejects an order that is pending review, identified by the given ‘id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable ’Allow approvals via API’ via the organization”s ‘Order Approvals’ settings from the Tremendous dashboard.
3690 3691 3692 3693 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3690 def reject_order(id, opts = {}) data, _status_code, _headers = reject_order_with_http_info(id, opts) data end |
#reject_order_with_http_info(id, opts = {}) ⇒ Array<(GetOrder200Response, Integer, Hash)>
Reject order Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable 'Allow approvals via API' via the organization''s 'Order Approvals' settings from the Tremendous dashboard.
3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3700 def reject_order_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.reject_order ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.reject_order" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.reject_order, must conform to the pattern #{pattern}." end # resource path local_var_path = '/order_approvals/{id}/reject'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetOrder200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.reject_order", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#reject_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#release_fraud_review(id, opts = {}) ⇒ GetFraudReview200Response
Release fraud review Completes the fraud review identified by the given ‘id` in the URL, and releases the associated reward to the recipient.
3758 3759 3760 3761 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3758 def release_fraud_review(id, opts = {}) data, _status_code, _headers = release_fraud_review_with_http_info(id, opts) data end |
#release_fraud_review_with_http_info(id, opts = {}) ⇒ Array<(GetFraudReview200Response, Integer, Hash)>
Release fraud review Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient.
3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3768 def release_fraud_review_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.release_fraud_review ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.release_fraud_review" end # resource path local_var_path = '/fraud_reviews/{id}/release'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetFraudReview200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.release_fraud_review", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#release_fraud_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#resend_reward(id, opts = {}) ⇒ Object
Resend reward Resends a reward, identified by the given ‘id` in the URL, to its recipient. Only rewards with a previous delivery failure can be resent.
3822 3823 3824 3825 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3822 def resend_reward(id, opts = {}) data, _status_code, _headers = resend_reward_with_http_info(id, opts) data end |
#resend_reward_with_http_info(id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Resend reward Resends a reward, identified by the given `id` in the URL, to its recipient. Only rewards with a previous delivery failure can be resent.
3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3833 def resend_reward_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.resend_reward ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.resend_reward" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.resend_reward, must conform to the pattern #{pattern}." end # resource path local_var_path = '/rewards/{id}/resend'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resend_reward_request']) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.resend_reward", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#resend_reward\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#simulate_webhook(id, simulate_webhook_request, opts = {}) ⇒ String
Test webhook Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3897 3898 3899 3900 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3897 def simulate_webhook(id, simulate_webhook_request, opts = {}) data, _status_code, _headers = simulate_webhook_with_http_info(id, simulate_webhook_request, opts) data end |
#simulate_webhook_with_http_info(id, simulate_webhook_request, opts = {}) ⇒ Array<(String, Integer, Hash)>
Test webhook Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3908 def simulate_webhook_with_http_info(id, simulate_webhook_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.simulate_webhook ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.simulate_webhook" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.simulate_webhook, must conform to the pattern #{pattern}." end # verify the required parameter 'simulate_webhook_request' is set if @api_client.config.client_side_validation && simulate_webhook_request.nil? fail ArgumentError, "Missing the required parameter 'simulate_webhook_request' when calling TremendousApi.simulate_webhook" end # resource path local_var_path = '/webhooks/{id}/simulate'.sub('{' + 'id' + '}', CGI.escape(id.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(['text/html', 'application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(simulate_webhook_request) # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.simulate_webhook", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#simulate_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_campaign(id, update_campaign_request, opts = {}) ⇒ CreateCampaign200Response
Update campaign
3975 3976 3977 3978 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3975 def update_campaign(id, update_campaign_request, opts = {}) data, _status_code, _headers = update_campaign_with_http_info(id, update_campaign_request, opts) data end |
#update_campaign_with_http_info(id, update_campaign_request, opts = {}) ⇒ Array<(CreateCampaign200Response, Integer, Hash)>
Update campaign
3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 |
# File 'lib/tremendous/api/tremendous_api.rb', line 3985 def update_campaign_with_http_info(id, update_campaign_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.update_campaign ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.update_campaign" end pattern = Regexp.new(/[A-Z0-9]{4,20}/) if @api_client.config.client_side_validation && id !~ pattern fail ArgumentError, "invalid value for 'id' when calling TremendousApi.update_campaign, must conform to the pattern #{pattern}." end # verify the required parameter 'update_campaign_request' is set if @api_client.config.client_side_validation && update_campaign_request.nil? fail ArgumentError, "Missing the required parameter 'update_campaign_request' when calling TremendousApi.update_campaign" end # resource path local_var_path = '/campaigns/{id}'.sub('{' + 'id' + '}', CGI.escape(id.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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_campaign_request) # return_type return_type = opts[:debug_return_type] || 'CreateCampaign200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.update_campaign", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#update_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_fraud_rule_list(rule_type, update_fraud_rule_list_request, opts = {}) ⇒ UpdateFraudRuleList200Response
Update fraud rule list Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the ‘review_ip` rule, a valid JSON body would be: “`json { "operation": "add", "config": { "ips": ["123.123.123.123"] } } “`
4053 4054 4055 4056 |
# File 'lib/tremendous/api/tremendous_api.rb', line 4053 def update_fraud_rule_list(rule_type, update_fraud_rule_list_request, opts = {}) data, _status_code, _headers = update_fraud_rule_list_with_http_info(rule_type, update_fraud_rule_list_request, opts) data end |
#update_fraud_rule_list_with_http_info(rule_type, update_fraud_rule_list_request, opts = {}) ⇒ Array<(UpdateFraudRuleList200Response, Integer, Hash)>
Update fraud rule list Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { "operation": "add", "config": { "ips": ["123.123.123.123"] } } ```
4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 |
# File 'lib/tremendous/api/tremendous_api.rb', line 4064 def update_fraud_rule_list_with_http_info(rule_type, update_fraud_rule_list_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TremendousApi.update_fraud_rule_list ...' end # verify the required parameter 'rule_type' is set if @api_client.config.client_side_validation && rule_type.nil? fail ArgumentError, "Missing the required parameter 'rule_type' when calling TremendousApi.update_fraud_rule_list" end # verify enum value allowable_values = ["review_country", "review_ip", "review_email", "allow_ip", "allow_email"] if @api_client.config.client_side_validation && !allowable_values.include?(rule_type) fail ArgumentError, "invalid value for \"rule_type\", must be one of #{allowable_values}" end # verify the required parameter 'update_fraud_rule_list_request' is set if @api_client.config.client_side_validation && update_fraud_rule_list_request.nil? fail ArgumentError, "Missing the required parameter 'update_fraud_rule_list_request' when calling TremendousApi.update_fraud_rule_list" end # resource path local_var_path = '/fraud_rules/{rule_type}/update_list'.sub('{' + 'rule_type' + '}', CGI.escape(rule_type.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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_fraud_rule_list_request) # return_type return_type = opts[:debug_return_type] || 'UpdateFraudRuleList200Response' # auth_names auth_names = opts[:debug_auth_names] || ['BearerApiKey'] = opts.merge( :operation => :"TremendousApi.update_fraud_rule_list", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TremendousApi#update_fraud_rule_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |