tremendous_ruby 5.24.0 → 5.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tremendous/api/tremendous_api.rb +2 -2
- data/lib/tremendous/models/campaign.rb +11 -1
- data/lib/tremendous/models/campaign_base.rb +11 -1
- data/lib/tremendous/models/create_campaign_request.rb +11 -1
- data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +1 -1
- data/lib/tremendous/models/delivery_details.rb +1 -1
- data/lib/tremendous/models/delivery_details_with_link.rb +1 -1
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +11 -1
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_auto_add_product_rule.rb +301 -0
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +1 -1
- data/lib/tremendous/models/reward_with_link_delivery.rb +1 -1
- data/lib/tremendous/models/reward_without_link_delivery.rb +1 -1
- data/lib/tremendous/models/single_reward_order_reward_delivery.rb +1 -1
- data/lib/tremendous/models/update_campaign.rb +11 -1
- data/lib/tremendous/models/update_campaign_request.rb +11 -1
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 307b6e1c5195c8ac800258ea24fbafb90f720f53288a7a4d88017e4d06299852
|
|
4
|
+
data.tar.gz: 4600ef6da76c2add8299b2bd768a9c470cc1a276f5fc076850c1e2c4e7f02783
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b546842458d841fade24ad8e3a80b4a2d71c9ffea6ea90a196976ff1779af731267086ede17d73355f08669a0a7173b4a1bc931ba9e006aecaeaf372da20dcd
|
|
7
|
+
data.tar.gz: 5d1c35589d4a04bebdc0ad1f4ed630420aaf4b94e64c47b16598f91e136beeee0ffa3e1170462219fe1f73df5674a0502ac25db2dba41ab341d08fe8b89a8511
|
|
@@ -756,7 +756,7 @@ module Tremendous
|
|
|
756
756
|
end
|
|
757
757
|
|
|
758
758
|
# Create order
|
|
759
|
-
# 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'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. Defaults to the organization's currency if not provided.</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=\"https://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 "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](https://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](https://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.
|
|
759
|
+
# 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'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. Defaults to the organization's currency if not provided.</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=\"https://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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</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 "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](https://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](https://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.
|
|
760
760
|
# @param create_order_request [CreateOrderRequest] Order to create
|
|
761
761
|
# @param [Hash] opts the optional parameters
|
|
762
762
|
# @return [CreateOrder200Response]
|
|
@@ -766,7 +766,7 @@ module Tremendous
|
|
|
766
766
|
end
|
|
767
767
|
|
|
768
768
|
# Create order
|
|
769
|
-
# 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. Defaults to the organization&#39;s currency if not provided.</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=\"https://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](https://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](https://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.
|
|
769
|
+
# 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. Defaults to the organization&#39;s currency if not provided.</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=\"https://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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</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](https://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](https://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.
|
|
770
770
|
# @param create_order_request [CreateOrderRequest] Order to create
|
|
771
771
|
# @param [Hash] opts the optional parameters
|
|
772
772
|
# @return [Array<(CreateOrder200Response, Integer, Hash)>] CreateOrder200Response data, response status code and response headers
|
|
@@ -30,6 +30,8 @@ module Tremendous
|
|
|
30
30
|
# Determines whether fees for premium products are added to the order total (`SENDER`) or deducted from the recipient's reward amount (`RECIPIENT`). Campaigns with `RECIPIENT` must include at least one fee-free product.
|
|
31
31
|
attr_accessor :fee_charged_to
|
|
32
32
|
|
|
33
|
+
attr_accessor :auto_add_product_rule
|
|
34
|
+
|
|
33
35
|
attr_accessor :webpage_style
|
|
34
36
|
|
|
35
37
|
attr_accessor :email_style
|
|
@@ -64,6 +66,7 @@ module Tremendous
|
|
|
64
66
|
:'description' => :'description',
|
|
65
67
|
:'products' => :'products',
|
|
66
68
|
:'fee_charged_to' => :'fee_charged_to',
|
|
69
|
+
:'auto_add_product_rule' => :'auto_add_product_rule',
|
|
67
70
|
:'webpage_style' => :'webpage_style',
|
|
68
71
|
:'email_style' => :'email_style'
|
|
69
72
|
}
|
|
@@ -87,6 +90,7 @@ module Tremendous
|
|
|
87
90
|
:'description' => :'String',
|
|
88
91
|
:'products' => :'Array<String>',
|
|
89
92
|
:'fee_charged_to' => :'String',
|
|
93
|
+
:'auto_add_product_rule' => :'ListCampaigns200ResponseCampaignsInnerAutoAddProductRule',
|
|
90
94
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
91
95
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
92
96
|
}
|
|
@@ -97,6 +101,7 @@ module Tremendous
|
|
|
97
101
|
Set.new([
|
|
98
102
|
:'description',
|
|
99
103
|
:'fee_charged_to',
|
|
104
|
+
:'auto_add_product_rule',
|
|
100
105
|
])
|
|
101
106
|
end
|
|
102
107
|
|
|
@@ -144,6 +149,10 @@ module Tremendous
|
|
|
144
149
|
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
145
150
|
end
|
|
146
151
|
|
|
152
|
+
if attributes.key?(:'auto_add_product_rule')
|
|
153
|
+
self.auto_add_product_rule = attributes[:'auto_add_product_rule']
|
|
154
|
+
end
|
|
155
|
+
|
|
147
156
|
if attributes.key?(:'webpage_style')
|
|
148
157
|
self.webpage_style = attributes[:'webpage_style']
|
|
149
158
|
end
|
|
@@ -241,6 +250,7 @@ module Tremendous
|
|
|
241
250
|
description == o.description &&
|
|
242
251
|
products == o.products &&
|
|
243
252
|
fee_charged_to == o.fee_charged_to &&
|
|
253
|
+
auto_add_product_rule == o.auto_add_product_rule &&
|
|
244
254
|
webpage_style == o.webpage_style &&
|
|
245
255
|
email_style == o.email_style
|
|
246
256
|
end
|
|
@@ -254,7 +264,7 @@ module Tremendous
|
|
|
254
264
|
# Calculates hash code according to all attributes.
|
|
255
265
|
# @return [Integer] Hash code
|
|
256
266
|
def hash
|
|
257
|
-
[id, name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
267
|
+
[id, name, description, products, fee_charged_to, auto_add_product_rule, webpage_style, email_style].hash
|
|
258
268
|
end
|
|
259
269
|
|
|
260
270
|
# Builds the object from hash
|
|
@@ -30,6 +30,8 @@ module Tremendous
|
|
|
30
30
|
# Determines whether fees for premium products are added to the order total (`SENDER`) or deducted from the recipient's reward amount (`RECIPIENT`). Campaigns with `RECIPIENT` must include at least one fee-free product.
|
|
31
31
|
attr_accessor :fee_charged_to
|
|
32
32
|
|
|
33
|
+
attr_accessor :auto_add_product_rule
|
|
34
|
+
|
|
33
35
|
attr_accessor :webpage_style
|
|
34
36
|
|
|
35
37
|
attr_accessor :email_style
|
|
@@ -64,6 +66,7 @@ module Tremendous
|
|
|
64
66
|
:'description' => :'description',
|
|
65
67
|
:'products' => :'products',
|
|
66
68
|
:'fee_charged_to' => :'fee_charged_to',
|
|
69
|
+
:'auto_add_product_rule' => :'auto_add_product_rule',
|
|
67
70
|
:'webpage_style' => :'webpage_style',
|
|
68
71
|
:'email_style' => :'email_style'
|
|
69
72
|
}
|
|
@@ -87,6 +90,7 @@ module Tremendous
|
|
|
87
90
|
:'description' => :'String',
|
|
88
91
|
:'products' => :'Array<String>',
|
|
89
92
|
:'fee_charged_to' => :'String',
|
|
93
|
+
:'auto_add_product_rule' => :'ListCampaigns200ResponseCampaignsInnerAutoAddProductRule',
|
|
90
94
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
91
95
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
92
96
|
}
|
|
@@ -97,6 +101,7 @@ module Tremendous
|
|
|
97
101
|
Set.new([
|
|
98
102
|
:'description',
|
|
99
103
|
:'fee_charged_to',
|
|
104
|
+
:'auto_add_product_rule',
|
|
100
105
|
])
|
|
101
106
|
end
|
|
102
107
|
|
|
@@ -138,6 +143,10 @@ module Tremendous
|
|
|
138
143
|
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
139
144
|
end
|
|
140
145
|
|
|
146
|
+
if attributes.key?(:'auto_add_product_rule')
|
|
147
|
+
self.auto_add_product_rule = attributes[:'auto_add_product_rule']
|
|
148
|
+
end
|
|
149
|
+
|
|
141
150
|
if attributes.key?(:'webpage_style')
|
|
142
151
|
self.webpage_style = attributes[:'webpage_style']
|
|
143
152
|
end
|
|
@@ -205,6 +214,7 @@ module Tremendous
|
|
|
205
214
|
description == o.description &&
|
|
206
215
|
products == o.products &&
|
|
207
216
|
fee_charged_to == o.fee_charged_to &&
|
|
217
|
+
auto_add_product_rule == o.auto_add_product_rule &&
|
|
208
218
|
webpage_style == o.webpage_style &&
|
|
209
219
|
email_style == o.email_style
|
|
210
220
|
end
|
|
@@ -218,7 +228,7 @@ module Tremendous
|
|
|
218
228
|
# Calculates hash code according to all attributes.
|
|
219
229
|
# @return [Integer] Hash code
|
|
220
230
|
def hash
|
|
221
|
-
[id, name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
231
|
+
[id, name, description, products, fee_charged_to, auto_add_product_rule, webpage_style, email_style].hash
|
|
222
232
|
end
|
|
223
233
|
|
|
224
234
|
# Builds the object from hash
|
|
@@ -28,6 +28,8 @@ module Tremendous
|
|
|
28
28
|
# Determines whether fees for premium products are added to the order total (`SENDER`) or deducted from the recipient's reward amount (`RECIPIENT`). Campaigns with `RECIPIENT` must include at least one fee-free product.
|
|
29
29
|
attr_accessor :fee_charged_to
|
|
30
30
|
|
|
31
|
+
attr_accessor :auto_add_product_rule
|
|
32
|
+
|
|
31
33
|
attr_accessor :webpage_style
|
|
32
34
|
|
|
33
35
|
attr_accessor :email_style
|
|
@@ -61,6 +63,7 @@ module Tremendous
|
|
|
61
63
|
:'description' => :'description',
|
|
62
64
|
:'products' => :'products',
|
|
63
65
|
:'fee_charged_to' => :'fee_charged_to',
|
|
66
|
+
:'auto_add_product_rule' => :'auto_add_product_rule',
|
|
64
67
|
:'webpage_style' => :'webpage_style',
|
|
65
68
|
:'email_style' => :'email_style'
|
|
66
69
|
}
|
|
@@ -83,6 +86,7 @@ module Tremendous
|
|
|
83
86
|
:'description' => :'String',
|
|
84
87
|
:'products' => :'Array<String>',
|
|
85
88
|
:'fee_charged_to' => :'String',
|
|
89
|
+
:'auto_add_product_rule' => :'ListCampaigns200ResponseCampaignsInnerAutoAddProductRule',
|
|
86
90
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
87
91
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
88
92
|
}
|
|
@@ -93,6 +97,7 @@ module Tremendous
|
|
|
93
97
|
Set.new([
|
|
94
98
|
:'description',
|
|
95
99
|
:'fee_charged_to',
|
|
100
|
+
:'auto_add_product_rule',
|
|
96
101
|
])
|
|
97
102
|
end
|
|
98
103
|
|
|
@@ -136,6 +141,10 @@ module Tremendous
|
|
|
136
141
|
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
137
142
|
end
|
|
138
143
|
|
|
144
|
+
if attributes.key?(:'auto_add_product_rule')
|
|
145
|
+
self.auto_add_product_rule = attributes[:'auto_add_product_rule']
|
|
146
|
+
end
|
|
147
|
+
|
|
139
148
|
if attributes.key?(:'webpage_style')
|
|
140
149
|
self.webpage_style = attributes[:'webpage_style']
|
|
141
150
|
end
|
|
@@ -211,6 +220,7 @@ module Tremendous
|
|
|
211
220
|
description == o.description &&
|
|
212
221
|
products == o.products &&
|
|
213
222
|
fee_charged_to == o.fee_charged_to &&
|
|
223
|
+
auto_add_product_rule == o.auto_add_product_rule &&
|
|
214
224
|
webpage_style == o.webpage_style &&
|
|
215
225
|
email_style == o.email_style
|
|
216
226
|
end
|
|
@@ -224,7 +234,7 @@ module Tremendous
|
|
|
224
234
|
# Calculates hash code according to all attributes.
|
|
225
235
|
# @return [Integer] Hash code
|
|
226
236
|
def hash
|
|
227
|
-
[name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
237
|
+
[name, description, products, fee_charged_to, auto_add_product_rule, webpage_style, email_style].hash
|
|
228
238
|
end
|
|
229
239
|
|
|
230
240
|
# Builds the object from hash
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class CreateOrder200ResponseOrderRewardsInnerDelivery
|
|
19
|
-
# How to deliver the reward to the recipient. <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
|
|
19
|
+
# How to deliver the reward to the recipient. <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
# Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link active). * `PENDING` - Delivery is pending but not yet scheduled.
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class DeliveryDetails
|
|
19
|
-
# How to deliver the reward to the recipient. <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
|
|
19
|
+
# How to deliver the reward to the recipient. <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
# Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link active). * `PENDING` - Delivery is pending but not yet scheduled.
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class DeliveryDetailsWithLink
|
|
19
|
-
# How to deliver the reward to the recipient. <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
|
|
19
|
+
# How to deliver the reward to the recipient. <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
# Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link active). * `PENDING` - Delivery is pending but not yet scheduled.
|
|
@@ -30,6 +30,8 @@ module Tremendous
|
|
|
30
30
|
# Determines whether fees for premium products are added to the order total (`SENDER`) or deducted from the recipient's reward amount (`RECIPIENT`). Campaigns with `RECIPIENT` must include at least one fee-free product.
|
|
31
31
|
attr_accessor :fee_charged_to
|
|
32
32
|
|
|
33
|
+
attr_accessor :auto_add_product_rule
|
|
34
|
+
|
|
33
35
|
attr_accessor :webpage_style
|
|
34
36
|
|
|
35
37
|
attr_accessor :email_style
|
|
@@ -64,6 +66,7 @@ module Tremendous
|
|
|
64
66
|
:'description' => :'description',
|
|
65
67
|
:'products' => :'products',
|
|
66
68
|
:'fee_charged_to' => :'fee_charged_to',
|
|
69
|
+
:'auto_add_product_rule' => :'auto_add_product_rule',
|
|
67
70
|
:'webpage_style' => :'webpage_style',
|
|
68
71
|
:'email_style' => :'email_style'
|
|
69
72
|
}
|
|
@@ -87,6 +90,7 @@ module Tremendous
|
|
|
87
90
|
:'description' => :'String',
|
|
88
91
|
:'products' => :'Array<String>',
|
|
89
92
|
:'fee_charged_to' => :'String',
|
|
93
|
+
:'auto_add_product_rule' => :'ListCampaigns200ResponseCampaignsInnerAutoAddProductRule',
|
|
90
94
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
91
95
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
92
96
|
}
|
|
@@ -97,6 +101,7 @@ module Tremendous
|
|
|
97
101
|
Set.new([
|
|
98
102
|
:'description',
|
|
99
103
|
:'fee_charged_to',
|
|
104
|
+
:'auto_add_product_rule',
|
|
100
105
|
])
|
|
101
106
|
end
|
|
102
107
|
|
|
@@ -144,6 +149,10 @@ module Tremendous
|
|
|
144
149
|
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
145
150
|
end
|
|
146
151
|
|
|
152
|
+
if attributes.key?(:'auto_add_product_rule')
|
|
153
|
+
self.auto_add_product_rule = attributes[:'auto_add_product_rule']
|
|
154
|
+
end
|
|
155
|
+
|
|
147
156
|
if attributes.key?(:'webpage_style')
|
|
148
157
|
self.webpage_style = attributes[:'webpage_style']
|
|
149
158
|
end
|
|
@@ -241,6 +250,7 @@ module Tremendous
|
|
|
241
250
|
description == o.description &&
|
|
242
251
|
products == o.products &&
|
|
243
252
|
fee_charged_to == o.fee_charged_to &&
|
|
253
|
+
auto_add_product_rule == o.auto_add_product_rule &&
|
|
244
254
|
webpage_style == o.webpage_style &&
|
|
245
255
|
email_style == o.email_style
|
|
246
256
|
end
|
|
@@ -254,7 +264,7 @@ module Tremendous
|
|
|
254
264
|
# Calculates hash code according to all attributes.
|
|
255
265
|
# @return [Integer] Hash code
|
|
256
266
|
def hash
|
|
257
|
-
[id, name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
267
|
+
[id, name, description, products, fee_charged_to, auto_add_product_rule, webpage_style, email_style].hash
|
|
258
268
|
end
|
|
259
269
|
|
|
260
270
|
# Builds the object from hash
|
data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_auto_add_product_rule.rb
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#API Endpoints
|
|
3
|
+
|
|
4
|
+
#Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and its members within Tremendous, please see the Tremendous Organizational API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2
|
|
7
|
+
Contact: developers@tremendous.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Tremendous
|
|
17
|
+
# When enabled, newly activated gift card products that match the optional country and currency filters are added to this campaign automatically. Applies to gift cards only — premium options, prepaid cards, and merchant cards with vendor fees are excluded. Affects future rewards only and does not retroactively add products to unredeemed rewards. On read, `enabled` is `true` whenever a rule is configured; `countries` and `currencies` are only present when the rule actually filters on them — an absent filter matches all values. On write: * Omit the field on `PUT` to leave the existing rule unchanged. * Send `null` or `{ \"enabled\": false }` to clear any existing rule. * Send `{ \"enabled\": true, ... }` to upsert. `countries` and `currencies` are optional; when present they must contain at least one entry. To match all countries (or all currencies), simply omit the key. * An empty object (`{}`) is rejected because `enabled` is required — use `{ \"enabled\": false }` or `null` to clear the rule.
|
|
18
|
+
class ListCampaigns200ResponseCampaignsInnerAutoAddProductRule
|
|
19
|
+
# Whether the auto-add rule is active.
|
|
20
|
+
attr_accessor :enabled
|
|
21
|
+
|
|
22
|
+
# ISO 3166-1 alpha-2 country codes (uppercase). When omitted, the rule matches all countries; when present, must contain at least one entry. Each code must be covered by at least one active Tremendous product — requests filtering on a country we don't currently sell into are rejected with a 422.
|
|
23
|
+
attr_accessor :countries
|
|
24
|
+
|
|
25
|
+
# ISO 4217 currency codes (uppercase). When omitted, the rule matches all currencies; when present, must contain at least one entry. Each code must be covered by at least one active Tremendous product — requests filtering on a currency we don't currently sell are rejected with a 422.
|
|
26
|
+
attr_accessor :currencies
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'enabled' => :'enabled',
|
|
32
|
+
:'countries' => :'countries',
|
|
33
|
+
:'currencies' => :'currencies'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'enabled' => :'Boolean',
|
|
51
|
+
:'countries' => :'Array<String>',
|
|
52
|
+
:'currencies' => :'Array<String>'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ListCampaigns200ResponseCampaignsInnerAutoAddProductRule` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ListCampaigns200ResponseCampaignsInnerAutoAddProductRule`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'enabled')
|
|
79
|
+
self.enabled = attributes[:'enabled']
|
|
80
|
+
else
|
|
81
|
+
self.enabled = nil
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'countries')
|
|
85
|
+
if (value = attributes[:'countries']).is_a?(Array)
|
|
86
|
+
self.countries = value
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'currencies')
|
|
91
|
+
if (value = attributes[:'currencies']).is_a?(Array)
|
|
92
|
+
self.currencies = value
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
98
|
+
# @return Array for valid properties with the reasons
|
|
99
|
+
def list_invalid_properties
|
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
101
|
+
invalid_properties = Array.new
|
|
102
|
+
if @enabled.nil?
|
|
103
|
+
invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if !@countries.nil? && @countries.length < 1
|
|
107
|
+
invalid_properties.push('invalid value for "countries", number of items must be greater than or equal to 1.')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if !@currencies.nil? && @currencies.length < 1
|
|
111
|
+
invalid_properties.push('invalid value for "currencies", number of items must be greater than or equal to 1.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
invalid_properties
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Check to see if the all the properties in the model are valid
|
|
118
|
+
# @return true if the model is valid
|
|
119
|
+
def valid?
|
|
120
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
121
|
+
return false if @enabled.nil?
|
|
122
|
+
return false if !@countries.nil? && @countries.length < 1
|
|
123
|
+
return false if !@currencies.nil? && @currencies.length < 1
|
|
124
|
+
true
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Custom attribute writer method with validation
|
|
128
|
+
# @param [Object] enabled Value to be assigned
|
|
129
|
+
def enabled=(enabled)
|
|
130
|
+
if enabled.nil?
|
|
131
|
+
fail ArgumentError, 'enabled cannot be nil'
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
@enabled = enabled
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Custom attribute writer method with validation
|
|
138
|
+
# @param [Object] countries Value to be assigned
|
|
139
|
+
def countries=(countries)
|
|
140
|
+
if countries.nil?
|
|
141
|
+
fail ArgumentError, 'countries cannot be nil'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if countries.length < 1
|
|
145
|
+
fail ArgumentError, 'invalid value for "countries", number of items must be greater than or equal to 1.'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
@countries = countries
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] currencies Value to be assigned
|
|
153
|
+
def currencies=(currencies)
|
|
154
|
+
if currencies.nil?
|
|
155
|
+
fail ArgumentError, 'currencies cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if currencies.length < 1
|
|
159
|
+
fail ArgumentError, 'invalid value for "currencies", number of items must be greater than or equal to 1.'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@currencies = currencies
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Checks equality by comparing each attribute.
|
|
166
|
+
# @param [Object] Object to be compared
|
|
167
|
+
def ==(o)
|
|
168
|
+
return true if self.equal?(o)
|
|
169
|
+
self.class == o.class &&
|
|
170
|
+
enabled == o.enabled &&
|
|
171
|
+
countries == o.countries &&
|
|
172
|
+
currencies == o.currencies
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# @see the `==` method
|
|
176
|
+
# @param [Object] Object to be compared
|
|
177
|
+
def eql?(o)
|
|
178
|
+
self == o
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Calculates hash code according to all attributes.
|
|
182
|
+
# @return [Integer] Hash code
|
|
183
|
+
def hash
|
|
184
|
+
[enabled, countries, currencies].hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Builds the object from hash
|
|
188
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
189
|
+
# @return [Object] Returns the model itself
|
|
190
|
+
def self.build_from_hash(attributes)
|
|
191
|
+
return nil unless attributes.is_a?(Hash)
|
|
192
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
193
|
+
transformed_hash = {}
|
|
194
|
+
openapi_types.each_pair do |key, type|
|
|
195
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
196
|
+
transformed_hash["#{key}"] = nil
|
|
197
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
198
|
+
# check to ensure the input is an array given that the attribute
|
|
199
|
+
# is documented as an array but the input is not
|
|
200
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
201
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
202
|
+
end
|
|
203
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
204
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
new(transformed_hash)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Deserializes the data based on type
|
|
211
|
+
# @param string type Data type
|
|
212
|
+
# @param string value Value to be deserialized
|
|
213
|
+
# @return [Object] Deserialized data
|
|
214
|
+
def self._deserialize(type, value)
|
|
215
|
+
case type.to_sym
|
|
216
|
+
when :Time
|
|
217
|
+
Time.parse(value)
|
|
218
|
+
when :Date
|
|
219
|
+
Date.parse(value)
|
|
220
|
+
when :String
|
|
221
|
+
value.to_s
|
|
222
|
+
when :Integer
|
|
223
|
+
value.to_i
|
|
224
|
+
when :Float
|
|
225
|
+
value.to_f
|
|
226
|
+
when :Boolean
|
|
227
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
228
|
+
true
|
|
229
|
+
else
|
|
230
|
+
false
|
|
231
|
+
end
|
|
232
|
+
when :Object
|
|
233
|
+
# generic object (usually a Hash), return directly
|
|
234
|
+
value
|
|
235
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
236
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
237
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
238
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
239
|
+
k_type = Regexp.last_match[:k_type]
|
|
240
|
+
v_type = Regexp.last_match[:v_type]
|
|
241
|
+
{}.tap do |hash|
|
|
242
|
+
value.each do |k, v|
|
|
243
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
else # model
|
|
247
|
+
# models (e.g. Pet) or oneOf
|
|
248
|
+
klass = Tremendous.const_get(type)
|
|
249
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Returns the string representation of the object
|
|
254
|
+
# @return [String] String presentation of the object
|
|
255
|
+
def to_s
|
|
256
|
+
to_hash.to_s
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
260
|
+
# @return [Hash] Returns the object in the form of hash
|
|
261
|
+
def to_body
|
|
262
|
+
to_hash
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Returns the object in the form of hash
|
|
266
|
+
# @return [Hash] Returns the object in the form of hash
|
|
267
|
+
def to_hash
|
|
268
|
+
hash = {}
|
|
269
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
270
|
+
value = self.send(attr)
|
|
271
|
+
if value.nil?
|
|
272
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
273
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
hash[param] = _to_hash(value)
|
|
277
|
+
end
|
|
278
|
+
hash
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Outputs non-array value in the form of hash
|
|
282
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
283
|
+
# @param [Object] value Any valid value
|
|
284
|
+
# @return [Hash] Returns the value in the form of hash
|
|
285
|
+
def _to_hash(value)
|
|
286
|
+
if value.is_a?(Array)
|
|
287
|
+
value.compact.map { |v| _to_hash(v) }
|
|
288
|
+
elsif value.is_a?(Hash)
|
|
289
|
+
{}.tap do |hash|
|
|
290
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
291
|
+
end
|
|
292
|
+
elsif value.respond_to? :to_hash
|
|
293
|
+
value.to_hash
|
|
294
|
+
else
|
|
295
|
+
value
|
|
296
|
+
end
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
end
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class ListRewards200ResponseRewardsInnerDelivery
|
|
19
|
-
# How to deliver the reward to the recipient. <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
|
|
19
|
+
# How to deliver the reward to the recipient. <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
# Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link active). * `PENDING` - Delivery is pending but not yet scheduled.
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class RewardWithLinkDelivery
|
|
19
|
-
# How to deliver the reward to the recipient. <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
|
|
19
|
+
# How to deliver the reward to the recipient. <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
# Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link active). * `PENDING` - Delivery is pending but not yet scheduled.
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class RewardWithoutLinkDelivery
|
|
19
|
-
# How to deliver the reward to the recipient. <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
|
|
19
|
+
# How to deliver the reward to the recipient. <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
# Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link active). * `PENDING` - Delivery is pending but not yet scheduled.
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class SingleRewardOrderRewardDelivery
|
|
19
|
-
# How to deliver the reward to the recipient. <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
|
|
19
|
+
# How to deliver the reward to the recipient. <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
attr_accessor :meta
|
|
@@ -30,6 +30,8 @@ module Tremendous
|
|
|
30
30
|
# Determines whether fees for premium products are added to the order total (`SENDER`) or deducted from the recipient's reward amount (`RECIPIENT`). Campaigns with `RECIPIENT` must include at least one fee-free product.
|
|
31
31
|
attr_accessor :fee_charged_to
|
|
32
32
|
|
|
33
|
+
attr_accessor :auto_add_product_rule
|
|
34
|
+
|
|
33
35
|
attr_accessor :webpage_style
|
|
34
36
|
|
|
35
37
|
attr_accessor :email_style
|
|
@@ -64,6 +66,7 @@ module Tremendous
|
|
|
64
66
|
:'description' => :'description',
|
|
65
67
|
:'products' => :'products',
|
|
66
68
|
:'fee_charged_to' => :'fee_charged_to',
|
|
69
|
+
:'auto_add_product_rule' => :'auto_add_product_rule',
|
|
67
70
|
:'webpage_style' => :'webpage_style',
|
|
68
71
|
:'email_style' => :'email_style'
|
|
69
72
|
}
|
|
@@ -87,6 +90,7 @@ module Tremendous
|
|
|
87
90
|
:'description' => :'String',
|
|
88
91
|
:'products' => :'Array<String>',
|
|
89
92
|
:'fee_charged_to' => :'String',
|
|
93
|
+
:'auto_add_product_rule' => :'ListCampaigns200ResponseCampaignsInnerAutoAddProductRule',
|
|
90
94
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
91
95
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
92
96
|
}
|
|
@@ -97,6 +101,7 @@ module Tremendous
|
|
|
97
101
|
Set.new([
|
|
98
102
|
:'description',
|
|
99
103
|
:'fee_charged_to',
|
|
104
|
+
:'auto_add_product_rule',
|
|
100
105
|
])
|
|
101
106
|
end
|
|
102
107
|
|
|
@@ -138,6 +143,10 @@ module Tremendous
|
|
|
138
143
|
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
139
144
|
end
|
|
140
145
|
|
|
146
|
+
if attributes.key?(:'auto_add_product_rule')
|
|
147
|
+
self.auto_add_product_rule = attributes[:'auto_add_product_rule']
|
|
148
|
+
end
|
|
149
|
+
|
|
141
150
|
if attributes.key?(:'webpage_style')
|
|
142
151
|
self.webpage_style = attributes[:'webpage_style']
|
|
143
152
|
end
|
|
@@ -205,6 +214,7 @@ module Tremendous
|
|
|
205
214
|
description == o.description &&
|
|
206
215
|
products == o.products &&
|
|
207
216
|
fee_charged_to == o.fee_charged_to &&
|
|
217
|
+
auto_add_product_rule == o.auto_add_product_rule &&
|
|
208
218
|
webpage_style == o.webpage_style &&
|
|
209
219
|
email_style == o.email_style
|
|
210
220
|
end
|
|
@@ -218,7 +228,7 @@ module Tremendous
|
|
|
218
228
|
# Calculates hash code according to all attributes.
|
|
219
229
|
# @return [Integer] Hash code
|
|
220
230
|
def hash
|
|
221
|
-
[id, name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
231
|
+
[id, name, description, products, fee_charged_to, auto_add_product_rule, webpage_style, email_style].hash
|
|
222
232
|
end
|
|
223
233
|
|
|
224
234
|
# Builds the object from hash
|
|
@@ -28,6 +28,8 @@ module Tremendous
|
|
|
28
28
|
# Determines whether fees for premium products are added to the order total (`SENDER`) or deducted from the recipient's reward amount (`RECIPIENT`). Campaigns with `RECIPIENT` must include at least one fee-free product.
|
|
29
29
|
attr_accessor :fee_charged_to
|
|
30
30
|
|
|
31
|
+
attr_accessor :auto_add_product_rule
|
|
32
|
+
|
|
31
33
|
attr_accessor :webpage_style
|
|
32
34
|
|
|
33
35
|
attr_accessor :email_style
|
|
@@ -61,6 +63,7 @@ module Tremendous
|
|
|
61
63
|
:'description' => :'description',
|
|
62
64
|
:'products' => :'products',
|
|
63
65
|
:'fee_charged_to' => :'fee_charged_to',
|
|
66
|
+
:'auto_add_product_rule' => :'auto_add_product_rule',
|
|
64
67
|
:'webpage_style' => :'webpage_style',
|
|
65
68
|
:'email_style' => :'email_style'
|
|
66
69
|
}
|
|
@@ -83,6 +86,7 @@ module Tremendous
|
|
|
83
86
|
:'description' => :'String',
|
|
84
87
|
:'products' => :'Array<String>',
|
|
85
88
|
:'fee_charged_to' => :'String',
|
|
89
|
+
:'auto_add_product_rule' => :'ListCampaigns200ResponseCampaignsInnerAutoAddProductRule',
|
|
86
90
|
:'webpage_style' => :'ListCampaigns200ResponseCampaignsInnerWebpageStyle',
|
|
87
91
|
:'email_style' => :'ListCampaigns200ResponseCampaignsInnerEmailStyle'
|
|
88
92
|
}
|
|
@@ -93,6 +97,7 @@ module Tremendous
|
|
|
93
97
|
Set.new([
|
|
94
98
|
:'description',
|
|
95
99
|
:'fee_charged_to',
|
|
100
|
+
:'auto_add_product_rule',
|
|
96
101
|
])
|
|
97
102
|
end
|
|
98
103
|
|
|
@@ -130,6 +135,10 @@ module Tremendous
|
|
|
130
135
|
self.fee_charged_to = attributes[:'fee_charged_to']
|
|
131
136
|
end
|
|
132
137
|
|
|
138
|
+
if attributes.key?(:'auto_add_product_rule')
|
|
139
|
+
self.auto_add_product_rule = attributes[:'auto_add_product_rule']
|
|
140
|
+
end
|
|
141
|
+
|
|
133
142
|
if attributes.key?(:'webpage_style')
|
|
134
143
|
self.webpage_style = attributes[:'webpage_style']
|
|
135
144
|
end
|
|
@@ -175,6 +184,7 @@ module Tremendous
|
|
|
175
184
|
description == o.description &&
|
|
176
185
|
products == o.products &&
|
|
177
186
|
fee_charged_to == o.fee_charged_to &&
|
|
187
|
+
auto_add_product_rule == o.auto_add_product_rule &&
|
|
178
188
|
webpage_style == o.webpage_style &&
|
|
179
189
|
email_style == o.email_style
|
|
180
190
|
end
|
|
@@ -188,7 +198,7 @@ module Tremendous
|
|
|
188
198
|
# Calculates hash code according to all attributes.
|
|
189
199
|
# @return [Integer] Hash code
|
|
190
200
|
def hash
|
|
191
|
-
[name, description, products, fee_charged_to, webpage_style, email_style].hash
|
|
201
|
+
[name, description, products, fee_charged_to, auto_add_product_rule, webpage_style, email_style].hash
|
|
192
202
|
end
|
|
193
203
|
|
|
194
204
|
# Builds the object from hash
|
data/lib/tremendous/version.rb
CHANGED
data/lib/tremendous.rb
CHANGED
|
@@ -134,6 +134,7 @@ require 'tremendous/models/list_balance_transactions200_response_transactions_in
|
|
|
134
134
|
require 'tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment'
|
|
135
135
|
require 'tremendous/models/list_campaigns200_response'
|
|
136
136
|
require 'tremendous/models/list_campaigns200_response_campaigns_inner'
|
|
137
|
+
require 'tremendous/models/list_campaigns200_response_campaigns_inner_auto_add_product_rule'
|
|
137
138
|
require 'tremendous/models/list_campaigns200_response_campaigns_inner_email_style'
|
|
138
139
|
require 'tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style'
|
|
139
140
|
require 'tremendous/models/list_connected_organization_members200_response'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tremendous_ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.25.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tremendous Developers
|
|
@@ -178,6 +178,7 @@ files:
|
|
|
178
178
|
- lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb
|
|
179
179
|
- lib/tremendous/models/list_campaigns200_response.rb
|
|
180
180
|
- lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb
|
|
181
|
+
- lib/tremendous/models/list_campaigns200_response_campaigns_inner_auto_add_product_rule.rb
|
|
181
182
|
- lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb
|
|
182
183
|
- lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb
|
|
183
184
|
- lib/tremendous/models/list_connected_organization_members200_response.rb
|