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
idin 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
idin 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
idin 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_connected_organization(id, opts = {}) ⇒ CreateConnectedOrganization200Response
Delete a connected organization Deletes a connected organization and revokes the associated OAuth connection.
-
#delete_connected_organization_member(id, opts = {}) ⇒ CreateConnectedOrganizationMember200Response
Remove a connected organization member Removes a connected organization member.
-
#delete_connected_organization_member_with_http_info(id, opts = {}) ⇒ Array<(CreateConnectedOrganizationMember200Response, Integer, Hash)>
Remove a connected organization member Removes a connected organization member.
-
#delete_connected_organization_with_http_info(id, opts = {}) ⇒ Array<(CreateConnectedOrganization200Response, Integer, Hash)>
Delete a connected organization Deletes a connected organization and revokes the associated OAuth connection.
-
#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_member(id, opts = {}) ⇒ nil
Delete member Removes an existing member from the organization, identified by the given
idin the URL. -
#delete_member_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete member Removes an existing member from the organization, identified by the given `id` in the URL.
-
#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.
-
#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.
-
#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
idin 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
idin 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
idin the URL. -
#get_connected_organization_member(id, opts = {}) ⇒ CreateConnectedOrganizationMember200Response
Retrieve a connected organization member Retrieve the connected organization member, identified by the given
idin 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
idin 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
idin 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
idin 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
idin 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
idin 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
idin the URL Using the ID that was returned byPOST /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
idin 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
idin 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.
-
#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.
-
#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 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 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
idin 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
idin 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
idin 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.
-
#update_member(id, update_member_request, opts = {}) ⇒ CreateMember200Response
Update member Updates the role of an existing member, identified by the given
idin the URL. -
#update_member_with_http_info(id, update_member_request, opts = {}) ⇒ Array<(CreateMember200Response, Integer, Hash)>
Update member Updates the role of an existing member, identified by the given `id` in the URL.
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. Rewards that have already been redeemed cannot be canceled: the request fails with a 422 error and the reward is left unchanged.
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. Rewards that have already been redeemed cannot be canceled: the request fails with a `422` error and the reward is left unchanged.
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.
226 227 228 229 |
# File 'lib/tremendous/api/tremendous_api.rb', line 226 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.
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 277 278 279 280 281 282 283 |
# File 'lib/tremendous/api/tremendous_api.rb', line 236 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'] # 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_api_key_request']) # 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
289 290 291 292 |
# File 'lib/tremendous/api/tremendous_api.rb', line 289 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
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 343 344 345 346 347 348 349 |
# File 'lib/tremendous/api/tremendous_api.rb', line 298 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. Optionally pass currency_code to set the connected organization's balance currency. Supported values are USD, EUR, and GBP. If omitted, the balance currency defaults to USD. Optionally pass a kyb_prefill object to forward KYB (Know Your Business) details you have already collected for the end client. When provided, these values prefill the end client's onboarding form; the end client still reviews, edits where needed, and submits the form. Every kyb_prefill field is optional, but any value provided is validated. Malformed KYB details (for example an unsupported country_code or a malformed website_url) return a 400.
356 357 358 359 |
# File 'lib/tremendous/api/tremendous_api.rb', line 356 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.
424 425 426 427 |
# File 'lib/tremendous/api/tremendous_api.rb', line 424 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.
493 494 495 496 |
# File 'lib/tremendous/api/tremendous_api.rb', line 493 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.
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 553 554 555 556 557 558 559 |
# File 'lib/tremendous/api/tremendous_api.rb', line 504 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.
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 479 480 481 482 483 484 485 |
# File 'lib/tremendous/api/tremendous_api.rb', line 434 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. Optionally pass `currency_code` to set the connected organization's balance currency. Supported values are `USD`, `EUR`, and `GBP`. If omitted, the balance currency defaults to `USD`. Optionally pass a `kyb_prefill` object to forward KYB (Know Your Business) details you have already collected for the end client. When provided, these values prefill the end client's onboarding form; the end client still reviews, edits where needed, and submits the form. Every `kyb_prefill` field is optional, but any value provided is validated. Malformed KYB details (for example an unsupported `country_code` or a malformed `website_url`) return a `400`.
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 411 412 413 414 415 416 417 |
# File 'lib/tremendous/api/tremendous_api.rb', line 366 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.
566 567 568 569 |
# File 'lib/tremendous/api/tremendous_api.rb', line 566 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.
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 621 622 623 624 625 626 627 |
# File 'lib/tremendous/api/tremendous_api.rb', line 576 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">
| Property | Type | Description | <div class="property-name"> <code class="property-name">po_number | <span class="property-type">string | Reference to the purchase order number within your organization | <tr class=""><div class="property-name"> <code class="property-name">amount | <span class="property-type">number <span class="property-format">double | Amount of the invoice | <tr class=""><div class="property-name"> <code class="property-name">currency_code | <span class="property-type">string | Currency of the invoice. Defaults to the organization's currency if not provided. | <tr class=""><div class="property-name"> <code class="property-name">currency | <span class="property-type">string | Deprecated: Use | <tr class=""><div class="property-name"> <code class="property-name">memo | <span class="property-type">string | A note to be included in the invoice. This is for your internal use and will not be visible to the recipient. |
|---|
634 635 636 637 |
# File 'lib/tremendous/api/tremendous_api.rb', line 634 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</code> </div> </td><td><span class="property-type">string</span></td><td><p>Currency of the invoice. Defaults to the organization's currency if not provided.</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>Deprecated: Use <code>currency_code</code> instead.</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>
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 689 690 691 692 693 694 695 |
# File 'lib/tremendous/api/tremendous_api.rb', line 644 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 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.
702 703 704 705 |
# File 'lib/tremendous/api/tremendous_api.rb', line 702 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 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.
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 757 758 759 760 761 762 763 |
# File 'lib/tremendous/api/tremendous_api.rb', line 712 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: > > <a style="display: block; margin-top: 20px;" href="/docs/sending-rewards-intro">Check it out! ## Request body <div class="object-schema-request-schema">
| Property | Type | Description | <div class="property-name"> <code class="property-name">external_id | <span class="property-type">string | Reference for this order, supplied by the customer. When set, It also allows for retrieving by | <tr class=""><div class="property-name"> <code class="property-name">payment | <span class="property-type">object | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Property | Type | Description | <div class="property-name"> <code class="property-name">funding_source_id | <span class="property-type">string | Tremendous ID of the funding source that will be used to pay for the order. You can also pass one of the following magic values (case-insensitive):
Note: |
|---|
A single reward, sent to a recipient. A reward is always part of an order.
Either products or campaign_id must be specified.
Show object properties
| Property | Type | Description | <div class="property-name"> <code class="property-name">id | <span class="property-type">string | Tremendous ID of the reward | <tr class="property-conditional-hint-response-only"><div class="property-name"> <code class="property-name">order_id | <span class="property-type">string | Tremendous ID of the order this reward is part of. | <tr class="property-conditional-hint-response-only"><div class="property-name"> <code class="property-name">created_at | <span class="property-type">string <span class="property-format">date-time | Date the reward was created | <tr class="property-conditional-hint-response-only"><div class="property-name"> <code class="property-name">expires_at | <span class="property-type">string <span class="property-format">date-time | Expiration date of the reward. If null, the reward does not expire. | <tr class="property-conditional-hint-request-only"><div class="property-name"> <code class="property-name">campaign_id | <span class="property-type">string | ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. | <tr class="property-conditional-hint-request-only"><div class="property-name"> <code class="property-name">products | <span class="property-type">array <span class="property-format">string | List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from. Providing a | <tr class=""><div class="property-name"> <code class="property-name">value | <span class="property-type">object | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Property | Type | Description | <div class="property-name"> <code class="property-name">denomination | <span class="property-type">number <span class="property-format">double | Amount of the reward | <tr class=""><div class="property-name"> <code class="property-name">currency_code | <span class="property-type">string | Currency of the reward. Defaults to the organization's currency if not provided. |
|---|
Details of the recipient of the reward
Show object properties
| Property | Type | Description | <div class="property-name"> <code class="property-name">name | <span class="property-type">string | Name of the recipient | <tr class=""><div class="property-name"> <code class="property-name">email | <span class="property-type">string | Email address of the recipient | <tr class=""><div class="property-name"> <code class="property-name">phone | <span class="property-type">string | Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +). |
|---|
Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.
Show array item type
| Property | Type | Description | <div class="property-name"> <code class="property-name">id | <span class="property-type">string | Tremendous ID of the custom field | <tr class=""><div class="property-name"> <code class="property-name">value | <span class="property-type">string | Value of the custom field | <tr class="property-conditional-hint-response-only"><div class="property-name"> <code class="property-name">label | <span class="property-type">string | Label of the custom field |
|---|
Set this to translate the redemption experience for this reward. Pass a 2-letter <a href="https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">ISO-639-1 code for the desired language. Defaults to en.
Details on how the reward is delivered to the recipient.
Show object properties
| Property | Type | Description | <div class="property-name"> <code class="property-name">method | <span class="property-type">string | How to deliver the reward to the recipient.
| <tr class=""><div class="property-name"> <code class="property-name">meta | <span class="property-type">object | Customizable reward delivery metadata, taking precedence over the related campaign settings. | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Property | Type | Description | <div class="property-name"> <code class="property-name">sender_name | <span class="property-type">string | 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. | <tr class=""><div class="property-name"> <code class="property-name">subject_line | <span class="property-type">string | The subject line used in the delivery. | <tr class=""><div class="property-name"> <code class="property-name">message | <span class="property-type">string | The content of the message of the reward, shown in the email / SMS and on the landing page. |
|---|
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.
770 771 772 773 |
# File 'lib/tremendous/api/tremendous_api.rb', line 770 def create_order(create_order_request, opts = {}) data, _status_code, _headers = create_order_with_http_info(create_order_request, opts) data end |