tremendous_ruby 5.5.0 → 5.6.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +9 -349
  3. data/lib/tremendous/models/base_order_for_create.rb +1 -1
  4. data/lib/tremendous/models/create_order200_response.rb +1 -1
  5. data/lib/tremendous/models/create_order200_response_order.rb +403 -0
  6. data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +326 -0
  7. data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +296 -0
  8. data/lib/tremendous/models/{create_public_key_request.rb → create_order201_response.rb} +14 -15
  9. data/lib/tremendous/models/create_order_request.rb +1 -1
  10. data/lib/tremendous/models/create_organization.rb +51 -4
  11. data/lib/tremendous/models/create_organization200_response_organization.rb +20 -45
  12. data/lib/tremendous/models/{public_keys_response_public_keys_inner.rb → create_organization_for_response.rb} +72 -20
  13. data/lib/tremendous/models/{public_key.rb → create_organization_properties.rb} +57 -20
  14. data/lib/tremendous/models/create_organization_request.rb +7 -0
  15. data/lib/tremendous/models/delivery_details.rb +0 -14
  16. data/lib/tremendous/models/delivery_details_with_link.rb +296 -0
  17. data/lib/tremendous/models/error_model.rb +11 -1
  18. data/lib/tremendous/models/fraud_rule400_response.rb +11 -1
  19. data/lib/tremendous/models/fraud_rule422_response.rb +11 -1
  20. data/lib/tremendous/models/fraud_rules_list_item.rb +4 -2
  21. data/lib/tremendous/models/generate_reward_link403_response.rb +11 -1
  22. data/lib/tremendous/models/invoice.rb +10 -1
  23. data/lib/tremendous/models/list_fraud_reviews200_response.rb +21 -4
  24. data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +4 -2
  25. data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +10 -1
  26. data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +4 -48
  27. data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +0 -14
  28. data/lib/tremendous/models/list_rewards401_response.rb +11 -1
  29. data/lib/tremendous/models/list_rewards401_response_errors.rb +4 -2
  30. data/lib/tremendous/models/list_rewards429_response.rb +11 -1
  31. data/lib/tremendous/models/order_base_payment.rb +4 -48
  32. data/lib/tremendous/models/order_with_link.rb +403 -0
  33. data/lib/tremendous/models/order_with_link_rewards_inner.rb +385 -0
  34. data/lib/tremendous/models/payment_details.rb +4 -48
  35. data/lib/tremendous/models/payout.rb +340 -0
  36. data/lib/tremendous/models/resend_reward422_response.rb +11 -1
  37. data/lib/tremendous/models/reward_for_order_create.rb +1 -1
  38. data/lib/tremendous/models/{single_reward_order1_reward.rb → reward_with_link.rb} +78 -16
  39. data/lib/tremendous/models/reward_with_link_delivery.rb +296 -0
  40. data/lib/tremendous/models/reward_without_link_delivery.rb +0 -14
  41. data/lib/tremendous/models/single_reward_order.rb +1 -1
  42. data/lib/tremendous/models/{single_reward_order1_payment.rb → single_reward_order_payment.rb} +3 -3
  43. data/lib/tremendous/models/single_reward_order_reward.rb +3 -75
  44. data/lib/tremendous/models/{single_reward_order1_reward_custom_fields_inner.rb → single_reward_order_reward_custom_fields_inner.rb} +3 -3
  45. data/lib/tremendous/models/{single_reward_order1_reward_delivery.rb → single_reward_order_reward_delivery.rb} +3 -3
  46. data/lib/tremendous/models/{test_public_key.rb → single_reward_order_with_link.rb} +14 -15
  47. data/lib/tremendous/models/single_reward_order_with_link_order.rb +403 -0
  48. data/lib/tremendous/version.rb +1 -1
  49. data/lib/tremendous.rb +17 -14
  50. metadata +19 -16
  51. data/lib/tremendous/models/create_invoice.rb +0 -244
  52. data/lib/tremendous/models/create_public_key.rb +0 -222
  53. data/lib/tremendous/models/create_public_key200_response.rb +0 -221
  54. data/lib/tremendous/models/public_keys_response.rb +0 -223
  55. data/lib/tremendous/models/single_reward_order1.rb +0 -242
  56. data/lib/tremendous/models/test_public_key_request.rb +0 -222
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e373c3197eb050738384d5a0c9b6fa68427568c4f2009d46f10753616068373
4
- data.tar.gz: dc5650f758d177c6567e647eff21ca88bc1d948caa4522f2cfffd34db34a9d52
3
+ metadata.gz: 96af2dae4c4e3b8f4fd55ba3cf1b2908106b25f5a42f364f47676ab8a3eb4736
4
+ data.tar.gz: c14390cdbef25a5b8c6b9f2cecb6481066de8eac4208ac535ef838690ae1a053
5
5
  SHA512:
6
- metadata.gz: 58c71b29162194ce4cd3838fec3198537146007c057802e22f9681e3a9a3eeab5949a815c7497c4f4ac75e43122bedcdf677c80db1052a6a258c3a7b8713a269
7
- data.tar.gz: 365e80647bcf28087a47c2a80bd6971ce3ce4a0019948f18ffcdc9ac4fda2b0a045a42bcad304ed17c53a06f0a4297987eb27dc758a68abd91eb8c79f460b023
6
+ metadata.gz: feee2e80b41fb8f2922417ab31217c1b304c0941969e4f8b64fe19627ae6fa9a238fb672f4c7e0b2908174fc645b79c8595933c8135aa7d0dec8b101c8c34020
7
+ data.tar.gz: 54f2f7ec9d4a625997bb3ba8828bc6ad62578ec03961fdc525b5a652ee8011f5c79dcd636b32bfb34d87abfcb227b9067e4d25746a637901eaf6c5cee690dd7b
@@ -23,7 +23,7 @@ module Tremendous
23
23
  # Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable 'Allow approvals via API' via the organization''s 'Order Approvals' settings from the Tremendous dashboard.
24
24
  # @param id [String] ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it's possible to use it instead.
25
25
  # @param [Hash] opts the optional parameters
26
- # @return [CreateOrder200Response]
26
+ # @return [CreateOrder201Response]
27
27
  def approve_order(id, opts = {})
28
28
  data, _status_code, _headers = approve_order_with_http_info(id, opts)
29
29
  data
@@ -33,7 +33,7 @@ module Tremendous
33
33
  # Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable 'Allow approvals via API' via the organization''s 'Order Approvals' settings from the Tremendous dashboard.
34
34
  # @param id [String] ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it's possible to use it instead.
35
35
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(CreateOrder200Response, Integer, Hash)>] CreateOrder200Response data, response status code and response headers
36
+ # @return [Array<(CreateOrder201Response, Integer, Hash)>] CreateOrder201Response data, response status code and response headers
37
37
  def approve_order_with_http_info(id, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: TremendousApi.approve_order ...'
@@ -65,7 +65,7 @@ module Tremendous
65
65
  post_body = opts[:debug_body]
66
66
 
67
67
  # return_type
68
- return_type = opts[:debug_return_type] || 'CreateOrder200Response'
68
+ return_type = opts[:debug_return_type] || 'CreateOrder201Response'
69
69
 
70
70
  # auth_names
71
71
  auth_names = opts[:debug_auth_names] || ['BearerApiKey']
@@ -545,74 +545,6 @@ module Tremendous
545
545
  return data, status_code, headers
546
546
  end
547
547
 
548
- # Create public key
549
- # Creating a public key is the way for your organization to share it with Tremendous. > 🔒 Generating asymmetric keys > > **We recommend using [OpenSSL](https://www.openssl.org/).** > > 1. Generate a private key and a public key in PEM: > `openssl genrsa -out tremendous_key.pem 4096` > > 2. Extract the public key in PEM format: > `openssl rsa -in tremendous_key.pem -outform PEM -pubout -out tremendous_key.pem.pub` > > 3. And, before making your request, encode it as a `base64` string: > `base64 -i tremendous_key.pem.pub` <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\">public_key</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Base64 encoded (public) PEM file</p> </td></tr> </tbody> </table> </div>
550
- # @param create_public_key_request [CreatePublicKeyRequest] Public key details
551
- # @param [Hash] opts the optional parameters
552
- # @return [CreatePublicKey200Response]
553
- def create_public_key(create_public_key_request, opts = {})
554
- data, _status_code, _headers = create_public_key_with_http_info(create_public_key_request, opts)
555
- data
556
- end
557
-
558
- # Create public key
559
- # Creating a public key is the way for your organization to share it with Tremendous. &gt; 🔒 Generating asymmetric keys &gt; &gt; **We recommend using [OpenSSL](https://www.openssl.org/).** &gt; &gt; 1. Generate a private key and a public key in PEM: &gt; &#x60;openssl genrsa -out tremendous_key.pem 4096&#x60; &gt; &gt; 2. Extract the public key in PEM format: &gt; &#x60;openssl rsa -in tremendous_key.pem -outform PEM -pubout -out tremendous_key.pem.pub&#x60; &gt; &gt; 3. And, before making your request, encode it as a &#x60;base64&#x60; string: &gt; &#x60;base64 -i tremendous_key.pem.pub&#x60; &lt;div class&#x3D;\&quot;object-schema-request-schema\&quot;&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Property&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody class&#x3D;\&quot;object-schema-table-body\&quot;&gt; &lt;tr class&#x3D;\&quot;\&quot;&gt;&lt;td&gt;&lt;div class&#x3D;\&quot;property-name\&quot;&gt; &lt;code class&#x3D;\&quot;property-name\&quot;&gt;public_key&lt;/code&gt; &lt;/div&gt; &lt;/td&gt;&lt;td&gt;&lt;span class&#x3D;\&quot;property-type\&quot;&gt;string&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Base64 encoded (public) PEM file&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt;
560
- # @param create_public_key_request [CreatePublicKeyRequest] Public key details
561
- # @param [Hash] opts the optional parameters
562
- # @return [Array<(CreatePublicKey200Response, Integer, Hash)>] CreatePublicKey200Response data, response status code and response headers
563
- def create_public_key_with_http_info(create_public_key_request, opts = {})
564
- if @api_client.config.debugging
565
- @api_client.config.logger.debug 'Calling API: TremendousApi.create_public_key ...'
566
- end
567
- # verify the required parameter 'create_public_key_request' is set
568
- if @api_client.config.client_side_validation && create_public_key_request.nil?
569
- fail ArgumentError, "Missing the required parameter 'create_public_key_request' when calling TremendousApi.create_public_key"
570
- end
571
- # resource path
572
- local_var_path = '/public_keys'
573
-
574
- # query parameters
575
- query_params = opts[:query_params] || {}
576
-
577
- # header parameters
578
- header_params = opts[:header_params] || {}
579
- # HTTP header 'Accept' (if needed)
580
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
581
- # HTTP header 'Content-Type'
582
- content_type = @api_client.select_header_content_type(['application/json'])
583
- if !content_type.nil?
584
- header_params['Content-Type'] = content_type
585
- end
586
-
587
- # form parameters
588
- form_params = opts[:form_params] || {}
589
-
590
- # http body (model)
591
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_public_key_request)
592
-
593
- # return_type
594
- return_type = opts[:debug_return_type] || 'CreatePublicKey200Response'
595
-
596
- # auth_names
597
- auth_names = opts[:debug_auth_names] || ['BearerApiKey']
598
-
599
- new_options = opts.merge(
600
- :operation => :"TremendousApi.create_public_key",
601
- :header_params => header_params,
602
- :query_params => query_params,
603
- :form_params => form_params,
604
- :body => post_body,
605
- :auth_names => auth_names,
606
- :return_type => return_type
607
- )
608
-
609
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
610
- if @api_client.config.debugging
611
- @api_client.config.logger.debug "API called: TremendousApi#create_public_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
612
- end
613
- return data, status_code, headers
614
- end
615
-
616
548
  # Create webhook
617
549
  # Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">url</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">uri</span></td><td><p>URL the webhook will make requests to</p> </td></tr> </tbody> </table> </div>
618
550
  # @param create_webhook_request [CreateWebhookRequest] Webhook details
@@ -812,74 +744,6 @@ module Tremendous
812
744
  return data, status_code, headers
813
745
  end
814
746
 
815
- # Delete public key
816
- # Deactivates a public key. Any further attempt to verify a request signature with this key will fail.
817
- # @param id [String] ID of the public key that should be deactivated
818
- # @param [Hash] opts the optional parameters
819
- # @return [nil]
820
- def delete_public_key(id, opts = {})
821
- delete_public_key_with_http_info(id, opts)
822
- nil
823
- end
824
-
825
- # Delete public key
826
- # Deactivates a public key. Any further attempt to verify a request signature with this key will fail.
827
- # @param id [String] ID of the public key that should be deactivated
828
- # @param [Hash] opts the optional parameters
829
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
830
- def delete_public_key_with_http_info(id, opts = {})
831
- if @api_client.config.debugging
832
- @api_client.config.logger.debug 'Calling API: TremendousApi.delete_public_key ...'
833
- end
834
- # verify the required parameter 'id' is set
835
- if @api_client.config.client_side_validation && id.nil?
836
- fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.delete_public_key"
837
- end
838
- pattern = Regexp.new(/[A-Z0-9]{4,20}/)
839
- if @api_client.config.client_side_validation && id !~ pattern
840
- fail ArgumentError, "invalid value for 'id' when calling TremendousApi.delete_public_key, must conform to the pattern #{pattern}."
841
- end
842
-
843
- # resource path
844
- local_var_path = '/public_keys/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
845
-
846
- # query parameters
847
- query_params = opts[:query_params] || {}
848
-
849
- # header parameters
850
- header_params = opts[:header_params] || {}
851
- # HTTP header 'Accept' (if needed)
852
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
853
-
854
- # form parameters
855
- form_params = opts[:form_params] || {}
856
-
857
- # http body (model)
858
- post_body = opts[:debug_body]
859
-
860
- # return_type
861
- return_type = opts[:debug_return_type]
862
-
863
- # auth_names
864
- auth_names = opts[:debug_auth_names] || ['BearerApiKey']
865
-
866
- new_options = opts.merge(
867
- :operation => :"TremendousApi.delete_public_key",
868
- :header_params => header_params,
869
- :query_params => query_params,
870
- :form_params => form_params,
871
- :body => post_body,
872
- :auth_names => auth_names,
873
- :return_type => return_type
874
- )
875
-
876
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
877
- if @api_client.config.debugging
878
- @api_client.config.logger.debug "API called: TremendousApi#delete_public_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
879
- end
880
- return data, status_code, headers
881
- end
882
-
883
747
  # Delete webhook
884
748
  # > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
885
749
  # @param id [String] ID of the webhook to delete
@@ -1617,7 +1481,7 @@ module Tremendous
1617
1481
  # Retrieve the order, identified by the given `id` in the URL
1618
1482
  # @param id [String] ID of the order that should be retrieved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it&#39;s possible to use it instead.
1619
1483
  # @param [Hash] opts the optional parameters
1620
- # @return [CreateOrder200Response]
1484
+ # @return [CreateOrder201Response]
1621
1485
  def get_order(id, opts = {})
1622
1486
  data, _status_code, _headers = get_order_with_http_info(id, opts)
1623
1487
  data
@@ -1627,7 +1491,7 @@ module Tremendous
1627
1491
  # Retrieve the order, identified by the given &#x60;id&#x60; in the URL
1628
1492
  # @param id [String] ID of the order that should be retrieved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it&#39;s possible to use it instead.
1629
1493
  # @param [Hash] opts the optional parameters
1630
- # @return [Array<(CreateOrder200Response, Integer, Hash)>] CreateOrder200Response data, response status code and response headers
1494
+ # @return [Array<(CreateOrder201Response, Integer, Hash)>] CreateOrder201Response data, response status code and response headers
1631
1495
  def get_order_with_http_info(id, opts = {})
1632
1496
  if @api_client.config.debugging
1633
1497
  @api_client.config.logger.debug 'Calling API: TremendousApi.get_order ...'
@@ -1654,7 +1518,7 @@ module Tremendous
1654
1518
  post_body = opts[:debug_body]
1655
1519
 
1656
1520
  # return_type
1657
- return_type = opts[:debug_return_type] || 'CreateOrder200Response'
1521
+ return_type = opts[:debug_return_type] || 'CreateOrder201Response'
1658
1522
 
1659
1523
  # auth_names
1660
1524
  auth_names = opts[:debug_auth_names] || ['BearerApiKey']
@@ -1810,74 +1674,6 @@ module Tremendous
1810
1674
  return data, status_code, headers
1811
1675
  end
1812
1676
 
1813
- # Retrieve public key
1814
- # Retrieve an active public key, identified by the given `id` in the URL.
1815
- # @param id [String] ID of the public key that should be retrieved
1816
- # @param [Hash] opts the optional parameters
1817
- # @return [CreatePublicKey200Response]
1818
- def get_public_key(id, opts = {})
1819
- data, _status_code, _headers = get_public_key_with_http_info(id, opts)
1820
- data
1821
- end
1822
-
1823
- # Retrieve public key
1824
- # Retrieve an active public key, identified by the given &#x60;id&#x60; in the URL.
1825
- # @param id [String] ID of the public key that should be retrieved
1826
- # @param [Hash] opts the optional parameters
1827
- # @return [Array<(CreatePublicKey200Response, Integer, Hash)>] CreatePublicKey200Response data, response status code and response headers
1828
- def get_public_key_with_http_info(id, opts = {})
1829
- if @api_client.config.debugging
1830
- @api_client.config.logger.debug 'Calling API: TremendousApi.get_public_key ...'
1831
- end
1832
- # verify the required parameter 'id' is set
1833
- if @api_client.config.client_side_validation && id.nil?
1834
- fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.get_public_key"
1835
- end
1836
- pattern = Regexp.new(/[A-Z0-9]{4,20}/)
1837
- if @api_client.config.client_side_validation && id !~ pattern
1838
- fail ArgumentError, "invalid value for 'id' when calling TremendousApi.get_public_key, must conform to the pattern #{pattern}."
1839
- end
1840
-
1841
- # resource path
1842
- local_var_path = '/public_keys/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1843
-
1844
- # query parameters
1845
- query_params = opts[:query_params] || {}
1846
-
1847
- # header parameters
1848
- header_params = opts[:header_params] || {}
1849
- # HTTP header 'Accept' (if needed)
1850
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1851
-
1852
- # form parameters
1853
- form_params = opts[:form_params] || {}
1854
-
1855
- # http body (model)
1856
- post_body = opts[:debug_body]
1857
-
1858
- # return_type
1859
- return_type = opts[:debug_return_type] || 'CreatePublicKey200Response'
1860
-
1861
- # auth_names
1862
- auth_names = opts[:debug_auth_names] || ['BearerApiKey']
1863
-
1864
- new_options = opts.merge(
1865
- :operation => :"TremendousApi.get_public_key",
1866
- :header_params => header_params,
1867
- :query_params => query_params,
1868
- :form_params => form_params,
1869
- :body => post_body,
1870
- :auth_names => auth_names,
1871
- :return_type => return_type
1872
- )
1873
-
1874
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1875
- if @api_client.config.debugging
1876
- @api_client.config.logger.debug "API called: TremendousApi#get_public_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1877
- end
1878
- return data, status_code, headers
1879
- end
1880
-
1881
1677
  # Retrieve single reward
1882
1678
  # Retrieve the reward, identified by the given `id` in the URL
1883
1679
  # @param id [String] ID of the reward that should be retrieved
@@ -2780,63 +2576,6 @@ module Tremendous
2780
2576
  return data, status_code, headers
2781
2577
  end
2782
2578
 
2783
- # List public keys
2784
- # Fetch a list of active public keys on your account. > 🚧 Inactive public keys are omitted > > The response does not include inactive public keys.
2785
- # @param [Hash] opts the optional parameters
2786
- # @return [PublicKeysResponse]
2787
- def list_public_keys(opts = {})
2788
- data, _status_code, _headers = list_public_keys_with_http_info(opts)
2789
- data
2790
- end
2791
-
2792
- # List public keys
2793
- # Fetch a list of active public keys on your account. &gt; 🚧 Inactive public keys are omitted &gt; &gt; The response does not include inactive public keys.
2794
- # @param [Hash] opts the optional parameters
2795
- # @return [Array<(PublicKeysResponse, Integer, Hash)>] PublicKeysResponse data, response status code and response headers
2796
- def list_public_keys_with_http_info(opts = {})
2797
- if @api_client.config.debugging
2798
- @api_client.config.logger.debug 'Calling API: TremendousApi.list_public_keys ...'
2799
- end
2800
- # resource path
2801
- local_var_path = '/public_keys'
2802
-
2803
- # query parameters
2804
- query_params = opts[:query_params] || {}
2805
-
2806
- # header parameters
2807
- header_params = opts[:header_params] || {}
2808
- # HTTP header 'Accept' (if needed)
2809
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2810
-
2811
- # form parameters
2812
- form_params = opts[:form_params] || {}
2813
-
2814
- # http body (model)
2815
- post_body = opts[:debug_body]
2816
-
2817
- # return_type
2818
- return_type = opts[:debug_return_type] || 'PublicKeysResponse'
2819
-
2820
- # auth_names
2821
- auth_names = opts[:debug_auth_names] || ['BearerApiKey']
2822
-
2823
- new_options = opts.merge(
2824
- :operation => :"TremendousApi.list_public_keys",
2825
- :header_params => header_params,
2826
- :query_params => query_params,
2827
- :form_params => form_params,
2828
- :body => post_body,
2829
- :auth_names => auth_names,
2830
- :return_type => return_type
2831
- )
2832
-
2833
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2834
- if @api_client.config.debugging
2835
- @api_client.config.logger.debug "API called: TremendousApi#list_public_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2836
- end
2837
- return data, status_code, headers
2838
- end
2839
-
2840
2579
  # List rewards
2841
2580
  # Retrieve a list of all created rewards
2842
2581
  # @param [Hash] opts the optional parameters
@@ -3083,7 +2822,7 @@ module Tremendous
3083
2822
  # Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable 'Allow approvals via API' via the organization''s 'Order Approvals' settings from the Tremendous dashboard.
3084
2823
  # @param id [String] ID of the order that should be rejected. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it&#39;s possible to use it instead.
3085
2824
  # @param [Hash] opts the optional parameters
3086
- # @return [CreateOrder200Response]
2825
+ # @return [CreateOrder201Response]
3087
2826
  def reject_order(id, opts = {})
3088
2827
  data, _status_code, _headers = reject_order_with_http_info(id, opts)
3089
2828
  data
@@ -3093,7 +2832,7 @@ module Tremendous
3093
2832
  # Rejects an order that is pending review, identified by the given &#x60;id&#x60; in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable &#39;Allow approvals via API&#39; via the organization&#39;&#39;s &#39;Order Approvals&#39; settings from the Tremendous dashboard.
3094
2833
  # @param id [String] ID of the order that should be rejected. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it&#39;s possible to use it instead.
3095
2834
  # @param [Hash] opts the optional parameters
3096
- # @return [Array<(CreateOrder200Response, Integer, Hash)>] CreateOrder200Response data, response status code and response headers
2835
+ # @return [Array<(CreateOrder201Response, Integer, Hash)>] CreateOrder201Response data, response status code and response headers
3097
2836
  def reject_order_with_http_info(id, opts = {})
3098
2837
  if @api_client.config.debugging
3099
2838
  @api_client.config.logger.debug 'Calling API: TremendousApi.reject_order ...'
@@ -3125,7 +2864,7 @@ module Tremendous
3125
2864
  post_body = opts[:debug_body]
3126
2865
 
3127
2866
  # return_type
3128
- return_type = opts[:debug_return_type] || 'CreateOrder200Response'
2867
+ return_type = opts[:debug_return_type] || 'CreateOrder201Response'
3129
2868
 
3130
2869
  # auth_names
3131
2870
  auth_names = opts[:debug_auth_names] || ['BearerApiKey']
@@ -3357,85 +3096,6 @@ module Tremendous
3357
3096
  return data, status_code, headers
3358
3097
  end
3359
3098
 
3360
- # Test public key
3361
- # Making a request to this endpoint with a JWT signed with your private key will return a 200 response if the public key is active and the signature is valid. > 💡 Testing your integration > > **You can use [JWT.io](https://jwt.io/) to generate a signed token:** > > > 1. Select “RS256” in their algorithm dropdown; > 3. Define a JSON payload such as `{ \"foo\": \"bar\" }`; > 4. Fill the “Verify signature” fields with your public and private keys and copy the “Encoded” token.
3362
- # @param id [String] ID of the public key to test
3363
- # @param test_public_key_request [TestPublicKeyRequest]
3364
- # @param [Hash] opts the optional parameters
3365
- # @return [nil]
3366
- def test_public_key(id, test_public_key_request, opts = {})
3367
- test_public_key_with_http_info(id, test_public_key_request, opts)
3368
- nil
3369
- end
3370
-
3371
- # Test public key
3372
- # Making a request to this endpoint with a JWT signed with your private key will return a 200 response if the public key is active and the signature is valid. &gt; 💡 Testing your integration &gt; &gt; **You can use [JWT.io](https://jwt.io/) to generate a signed token:** &gt; &gt; &gt; 1. Select “RS256” in their algorithm dropdown; &gt; 3. Define a JSON payload such as &#x60;{ \&quot;foo\&quot;: \&quot;bar\&quot; }&#x60;; &gt; 4. Fill the “Verify signature” fields with your public and private keys and copy the “Encoded” token.
3373
- # @param id [String] ID of the public key to test
3374
- # @param test_public_key_request [TestPublicKeyRequest]
3375
- # @param [Hash] opts the optional parameters
3376
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3377
- def test_public_key_with_http_info(id, test_public_key_request, opts = {})
3378
- if @api_client.config.debugging
3379
- @api_client.config.logger.debug 'Calling API: TremendousApi.test_public_key ...'
3380
- end
3381
- # verify the required parameter 'id' is set
3382
- if @api_client.config.client_side_validation && id.nil?
3383
- fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.test_public_key"
3384
- end
3385
- pattern = Regexp.new(/[A-Z0-9]{4,20}/)
3386
- if @api_client.config.client_side_validation && id !~ pattern
3387
- fail ArgumentError, "invalid value for 'id' when calling TremendousApi.test_public_key, must conform to the pattern #{pattern}."
3388
- end
3389
-
3390
- # verify the required parameter 'test_public_key_request' is set
3391
- if @api_client.config.client_side_validation && test_public_key_request.nil?
3392
- fail ArgumentError, "Missing the required parameter 'test_public_key_request' when calling TremendousApi.test_public_key"
3393
- end
3394
- # resource path
3395
- local_var_path = '/public_keys/{id}/decode_jwt'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
3396
-
3397
- # query parameters
3398
- query_params = opts[:query_params] || {}
3399
-
3400
- # header parameters
3401
- header_params = opts[:header_params] || {}
3402
- # HTTP header 'Accept' (if needed)
3403
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3404
- # HTTP header 'Content-Type'
3405
- content_type = @api_client.select_header_content_type(['application/json'])
3406
- if !content_type.nil?
3407
- header_params['Content-Type'] = content_type
3408
- end
3409
-
3410
- # form parameters
3411
- form_params = opts[:form_params] || {}
3412
-
3413
- # http body (model)
3414
- post_body = opts[:debug_body] || @api_client.object_to_http_body(test_public_key_request)
3415
-
3416
- # return_type
3417
- return_type = opts[:debug_return_type]
3418
-
3419
- # auth_names
3420
- auth_names = opts[:debug_auth_names] || ['BearerApiKey']
3421
-
3422
- new_options = opts.merge(
3423
- :operation => :"TremendousApi.test_public_key",
3424
- :header_params => header_params,
3425
- :query_params => query_params,
3426
- :form_params => form_params,
3427
- :body => post_body,
3428
- :auth_names => auth_names,
3429
- :return_type => return_type
3430
- )
3431
-
3432
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3433
- if @api_client.config.debugging
3434
- @api_client.config.logger.debug "API called: TremendousApi#test_public_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3435
- end
3436
- return data, status_code, headers
3437
- end
3438
-
3439
3099
  # Update campaign
3440
3100
  # @param id [String] ID of the campaign that should be updated
3441
3101
  # @param update_campaign_request [UpdateCampaignRequest] Campaign details
@@ -37,7 +37,7 @@ module Tremendous
37
37
  def self.openapi_types
38
38
  {
39
39
  :'external_id' => :'String',
40
- :'payment' => :'SingleRewardOrder1Payment'
40
+ :'payment' => :'SingleRewardOrderPayment'
41
41
  }
42
42
  end
43
43
 
@@ -32,7 +32,7 @@ module Tremendous
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'order' => :'ListOrders200ResponseOrdersInner'
35
+ :'order' => :'CreateOrder200ResponseOrder'
36
36
  }
37
37
  end
38
38