onesignal 5.11.2 → 5.13.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 (163) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Gemfile.lock +2 -2
  4. data/README.md +3 -3
  5. data/docs/CreateJourneyRequest.md +30 -0
  6. data/docs/DefaultApi.md +563 -0
  7. data/docs/Journey.md +48 -0
  8. data/docs/JourneyAudience.md +28 -0
  9. data/docs/JourneyBranch.md +24 -0
  10. data/docs/JourneyBranchStats.md +18 -0
  11. data/docs/JourneyCondition.md +34 -0
  12. data/docs/JourneyEarlyExit.md +20 -0
  13. data/docs/JourneyEarlyExitRules.md +24 -0
  14. data/docs/JourneyEarlyExitRulesOnEvent.md +18 -0
  15. data/docs/JourneyEarlyExitRulesOnSegment.md +18 -0
  16. data/docs/JourneyEventAttribute.md +22 -0
  17. data/docs/JourneyListAudience.md +18 -0
  18. data/docs/JourneyListItem.md +40 -0
  19. data/docs/JourneyListResponse.md +22 -0
  20. data/docs/JourneyMessageStats.md +18 -0
  21. data/docs/JourneyNode.md +50 -0
  22. data/docs/JourneyNodeStats.md +26 -0
  23. data/docs/JourneyReentryRules.md +18 -0
  24. data/docs/JourneySchedule.md +22 -0
  25. data/docs/JourneyStats.md +28 -0
  26. data/docs/JourneyTimePoint.md +20 -0
  27. data/docs/JourneyTimeWindow.md +22 -0
  28. data/docs/JourneyWaitUntilExpiration.md +20 -0
  29. data/docs/StartLiveActivityRequest.md +1 -1
  30. data/docs/UpdateJourneyNodeRequest.md +48 -0
  31. data/docs/UpdateJourneyRequest.md +34 -0
  32. data/docs/UpdateLiveActivityRequest.md +7 -3
  33. data/lib/onesignal/api/default_api.rb +524 -0
  34. data/lib/onesignal/api_client.rb +1 -1
  35. data/lib/onesignal/models/create_journey_request.rb +287 -0
  36. data/lib/onesignal/models/journey.rb +409 -0
  37. data/lib/onesignal/models/journey_audience.rb +316 -0
  38. data/lib/onesignal/models/journey_branch.rb +250 -0
  39. data/lib/onesignal/models/journey_branch_stats.rb +220 -0
  40. data/lib/onesignal/models/journey_condition.rb +360 -0
  41. data/lib/onesignal/models/journey_early_exit.rb +231 -0
  42. data/lib/onesignal/models/journey_early_exit_rules.rb +251 -0
  43. data/lib/onesignal/models/journey_early_exit_rules_on_event.rb +224 -0
  44. data/lib/onesignal/models/journey_early_exit_rules_on_segment.rb +221 -0
  45. data/lib/onesignal/models/journey_event_attribute.rb +283 -0
  46. data/lib/onesignal/models/journey_list_audience.rb +254 -0
  47. data/lib/onesignal/models/journey_list_item.rb +366 -0
  48. data/lib/onesignal/models/journey_list_response.rb +241 -0
  49. data/lib/onesignal/models/journey_message_stats.rb +222 -0
  50. data/lib/onesignal/models/journey_node.rb +480 -0
  51. data/lib/onesignal/models/journey_node_stats.rb +293 -0
  52. data/lib/onesignal/models/journey_reentry_rules.rb +236 -0
  53. data/lib/onesignal/models/journey_schedule.rb +243 -0
  54. data/lib/onesignal/models/journey_stats.rb +274 -0
  55. data/lib/onesignal/models/journey_time_point.rb +277 -0
  56. data/lib/onesignal/models/journey_time_window.rb +266 -0
  57. data/lib/onesignal/models/journey_wait_until_expiration.rb +256 -0
  58. data/lib/onesignal/models/start_live_activity_request.rb +1 -1
  59. data/lib/onesignal/models/update_journey_node_request.rb +454 -0
  60. data/lib/onesignal/models/update_journey_request.rb +337 -0
  61. data/lib/onesignal/models/update_live_activity_request.rb +27 -6
  62. data/lib/onesignal/version.rb +1 -1
  63. data/lib/onesignal.rb +25 -0
  64. data/spec/api/default_api_spec.rb +95 -0
  65. data/spec/models/create_journey_request_spec.rb +69 -0
  66. data/spec/models/journey_audience_spec.rb +67 -0
  67. data/spec/models/journey_branch_spec.rb +51 -0
  68. data/spec/models/journey_branch_stats_spec.rb +33 -0
  69. data/spec/models/journey_condition_spec.rb +89 -0
  70. data/spec/models/journey_early_exit_rules_on_event_spec.rb +33 -0
  71. data/spec/models/journey_early_exit_rules_on_segment_spec.rb +33 -0
  72. data/spec/models/journey_early_exit_rules_spec.rb +51 -0
  73. data/spec/models/journey_early_exit_spec.rb +39 -0
  74. data/spec/models/journey_event_attribute_spec.rb +49 -0
  75. data/spec/models/journey_list_audience_spec.rb +37 -0
  76. data/spec/models/journey_list_item_spec.rb +103 -0
  77. data/spec/models/journey_list_response_spec.rb +45 -0
  78. data/spec/models/journey_message_stats_spec.rb +33 -0
  79. data/spec/models/journey_node_spec.rb +137 -0
  80. data/spec/models/journey_node_stats_spec.rb +61 -0
  81. data/spec/models/journey_reentry_rules_spec.rb +33 -0
  82. data/spec/models/journey_schedule_spec.rb +45 -0
  83. data/spec/models/journey_spec.rb +127 -0
  84. data/spec/models/journey_stats_spec.rb +63 -0
  85. data/spec/models/journey_time_point_spec.rb +39 -0
  86. data/spec/models/journey_time_window_spec.rb +45 -0
  87. data/spec/models/journey_wait_until_expiration_spec.rb +39 -0
  88. data/spec/models/update_journey_node_request_spec.rb +127 -0
  89. data/spec/models/update_journey_request_spec.rb +85 -0
  90. data/spec/models/update_live_activity_request_spec.rb +12 -0
  91. data/vendor/bundle/ruby/3.2.0/cache/psych-5.5.0.gem +0 -0
  92. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  93. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  94. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/gem_make.out +5 -5
  95. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/mkmf.log +3 -3
  96. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  97. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +28 -0
  98. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/psych.so +0 -0
  99. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  100. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  101. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/README.md +53 -0
  102. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/extconf.rb +22 -0
  103. data/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych/psych.c +68 -0
  104. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych.h +4 -0
  105. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_emitter.c +4 -0
  106. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_parser.c +79 -18
  107. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/class_loader.rb +1 -0
  108. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/parser.rb +40 -1
  109. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/scalar_scanner.rb +15 -3
  110. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/versions.rb +1 -1
  111. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/to_ruby.rb +20 -9
  112. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/yaml_tree.rb +0 -3
  113. data/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/lib/psych.so +0 -0
  114. data/vendor/bundle/ruby/3.2.0/specifications/{psych-5.4.0.gemspec → psych-5.5.0.gemspec} +2 -2
  115. metadata +162 -62
  116. data/vendor/bundle/ruby/3.2.0/cache/psych-5.4.0.gem +0 -0
  117. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +0 -28
  118. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/psych.so +0 -0
  119. data/vendor/bundle/ruby/3.2.0/gems/psych-5.4.0/ext/psych/psych.c +0 -36
  120. data/vendor/bundle/ruby/3.2.0/gems/psych-5.4.0/lib/psych.so +0 -0
  121. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/gem.build_complete +0 -0
  122. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/mkmf.log +0 -0
  123. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/CONTRIBUTING.md +0 -0
  124. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/LICENSE +0 -0
  125. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/Makefile +0 -0
  126. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/depend +0 -0
  127. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_emitter.h +0 -0
  128. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_parser.h +0 -0
  129. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_to_ruby.c +0 -0
  130. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_to_ruby.h +0 -0
  131. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_yaml_tree.c +0 -0
  132. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_yaml_tree.h +0 -0
  133. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/coder.rb +0 -0
  134. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/core_ext.rb +0 -0
  135. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/exception.rb +0 -0
  136. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handler.rb +0 -0
  137. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handlers/document_stream.rb +0 -0
  138. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handlers/recorder.rb +0 -0
  139. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/ruby_events.rb +0 -0
  140. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/stream.rb +0 -0
  141. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/tree_builder.rb +0 -0
  142. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/yaml_events.rb +0 -0
  143. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/alias.rb +0 -0
  144. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/document.rb +0 -0
  145. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/mapping.rb +0 -0
  146. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/node.rb +0 -0
  147. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/scalar.rb +0 -0
  148. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/sequence.rb +0 -0
  149. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/stream.rb +0 -0
  150. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes.rb +0 -0
  151. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/omap.rb +0 -0
  152. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/set.rb +0 -0
  153. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/stream.rb +0 -0
  154. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/streaming.rb +0 -0
  155. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/syntax_error.rb +0 -0
  156. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/tree_builder.rb +0 -0
  157. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/depth_first.rb +0 -0
  158. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/emitter.rb +0 -0
  159. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/json_tree.rb +0 -0
  160. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/visitor.rb +0 -0
  161. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors.rb +0 -0
  162. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/y.rb +0 -0
  163. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych.rb +0 -0
@@ -547,6 +547,80 @@ module OneSignal
547
547
  return data, status_code, headers
548
548
  end
549
549
 
550
+ # Create journey
551
+ # The Journeys API is in beta. Endpoints and response fields can still change. Create a new journey with an audience and a node graph. Journeys are always created in the draft state. The authenticated App API key must have permission to create journeys.
552
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
553
+ # @param create_journey_request [CreateJourneyRequest]
554
+ # @param [Hash] opts the optional parameters
555
+ # @return [Journey]
556
+ def create_journey(app_id, create_journey_request, opts = {})
557
+ data, _status_code, _headers = create_journey_with_http_info(app_id, create_journey_request, opts)
558
+ data
559
+ end
560
+
561
+ # Create journey
562
+ # The Journeys API is in beta. Endpoints and response fields can still change. Create a new journey with an audience and a node graph. Journeys are always created in the draft state. The authenticated App API key must have permission to create journeys.
563
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
564
+ # @param create_journey_request [CreateJourneyRequest]
565
+ # @param [Hash] opts the optional parameters
566
+ # @return [Array<(Journey, Integer, Hash)>] Journey data, response status code and response headers
567
+ def create_journey_with_http_info(app_id, create_journey_request, opts = {})
568
+ if @api_client.config.debugging
569
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_journey ...'
570
+ end
571
+ # verify the required parameter 'app_id' is set
572
+ if @api_client.config.client_side_validation && app_id.nil?
573
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.create_journey"
574
+ end
575
+ # verify the required parameter 'create_journey_request' is set
576
+ if @api_client.config.client_side_validation && create_journey_request.nil?
577
+ fail ArgumentError, "Missing the required parameter 'create_journey_request' when calling DefaultApi.create_journey"
578
+ end
579
+ # resource path
580
+ local_var_path = '/apps/{app_id}/journeys'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
581
+
582
+ # query parameters
583
+ query_params = opts[:query_params] || {}
584
+
585
+ # header parameters
586
+ header_params = opts[:header_params] || {}
587
+ # HTTP header 'Accept' (if needed)
588
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
589
+ # HTTP header 'Content-Type'
590
+ content_type = @api_client.select_header_content_type(['application/json'])
591
+ if !content_type.nil?
592
+ header_params['Content-Type'] = content_type
593
+ end
594
+
595
+ # form parameters
596
+ form_params = opts[:form_params] || {}
597
+
598
+ # http body (model)
599
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_journey_request)
600
+
601
+ # return_type
602
+ return_type = opts[:debug_return_type] || 'Journey'
603
+
604
+ # auth_names
605
+ auth_names = opts[:debug_auth_names] || ['rest_api_key']
606
+
607
+ new_options = opts.merge(
608
+ :operation => :"DefaultApi.create_journey",
609
+ :header_params => header_params,
610
+ :query_params => query_params,
611
+ :form_params => form_params,
612
+ :body => post_body,
613
+ :auth_names => auth_names,
614
+ :return_type => return_type
615
+ )
616
+
617
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
618
+ if @api_client.config.debugging
619
+ @api_client.config.logger.debug "API called: DefaultApi#create_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
620
+ end
621
+ return data, status_code, headers
622
+ end
623
+
550
624
  # Create notification
551
625
  # Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request.
552
626
  # @param notification [Notification]
@@ -1057,6 +1131,75 @@ module OneSignal
1057
1131
  return data, status_code, headers
1058
1132
  end
1059
1133
 
1134
+ # Delete journey
1135
+ # The Journeys API is in beta. Endpoints and response fields can still change. Permanently delete a journey by its UUID. Returns { \"success\": true } on success. The authenticated App API key must have permission to delete journeys. Deleting a journey stops any in-flight users and cannot be undone. Archive a running journey instead if you need to keep its data.
1136
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
1137
+ # @param journey_id [String] UUID of the journey to delete.
1138
+ # @param [Hash] opts the optional parameters
1139
+ # @return [GenericSuccessBoolResponse]
1140
+ def delete_journey(app_id, journey_id, opts = {})
1141
+ data, _status_code, _headers = delete_journey_with_http_info(app_id, journey_id, opts)
1142
+ data
1143
+ end
1144
+
1145
+ # Delete journey
1146
+ # The Journeys API is in beta. Endpoints and response fields can still change. Permanently delete a journey by its UUID. Returns { \&quot;success\&quot;: true } on success. The authenticated App API key must have permission to delete journeys. Deleting a journey stops any in-flight users and cannot be undone. Archive a running journey instead if you need to keep its data.
1147
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
1148
+ # @param journey_id [String] UUID of the journey to delete.
1149
+ # @param [Hash] opts the optional parameters
1150
+ # @return [Array<(GenericSuccessBoolResponse, Integer, Hash)>] GenericSuccessBoolResponse data, response status code and response headers
1151
+ def delete_journey_with_http_info(app_id, journey_id, opts = {})
1152
+ if @api_client.config.debugging
1153
+ @api_client.config.logger.debug 'Calling API: DefaultApi.delete_journey ...'
1154
+ end
1155
+ # verify the required parameter 'app_id' is set
1156
+ if @api_client.config.client_side_validation && app_id.nil?
1157
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.delete_journey"
1158
+ end
1159
+ # verify the required parameter 'journey_id' is set
1160
+ if @api_client.config.client_side_validation && journey_id.nil?
1161
+ fail ArgumentError, "Missing the required parameter 'journey_id' when calling DefaultApi.delete_journey"
1162
+ end
1163
+ # resource path
1164
+ local_var_path = '/apps/{app_id}/journeys/{journey_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'journey_id' + '}', CGI.escape(journey_id.to_s))
1165
+
1166
+ # query parameters
1167
+ query_params = opts[:query_params] || {}
1168
+
1169
+ # header parameters
1170
+ header_params = opts[:header_params] || {}
1171
+ # HTTP header 'Accept' (if needed)
1172
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1173
+
1174
+ # form parameters
1175
+ form_params = opts[:form_params] || {}
1176
+
1177
+ # http body (model)
1178
+ post_body = opts[:debug_body]
1179
+
1180
+ # return_type
1181
+ return_type = opts[:debug_return_type] || 'GenericSuccessBoolResponse'
1182
+
1183
+ # auth_names
1184
+ auth_names = opts[:debug_auth_names] || ['rest_api_key']
1185
+
1186
+ new_options = opts.merge(
1187
+ :operation => :"DefaultApi.delete_journey",
1188
+ :header_params => header_params,
1189
+ :query_params => query_params,
1190
+ :form_params => form_params,
1191
+ :body => post_body,
1192
+ :auth_names => auth_names,
1193
+ :return_type => return_type
1194
+ )
1195
+
1196
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1197
+ if @api_client.config.debugging
1198
+ @api_client.config.logger.debug "API called: DefaultApi#delete_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1199
+ end
1200
+ return data, status_code, headers
1201
+ end
1202
+
1060
1203
  # Delete Segment
1061
1204
  # Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard.
1062
1205
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
@@ -2837,6 +2980,172 @@ module OneSignal
2837
2980
  return data, status_code, headers
2838
2981
  end
2839
2982
 
2983
+ # Update journey
2984
+ # The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a journey using JSON Merge Patch (RFC 7396). Send only the fields you want to change; omitted fields are left unchanged. A null value clears a nullable field, and arrays such as nodes are replaced wholesale. Set state to active to activate a draft journey.
2985
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
2986
+ # @param journey_id [String] UUID of the journey to update.
2987
+ # @param update_journey_request [UpdateJourneyRequest]
2988
+ # @param [Hash] opts the optional parameters
2989
+ # @return [Journey]
2990
+ def update_journey(app_id, journey_id, update_journey_request, opts = {})
2991
+ data, _status_code, _headers = update_journey_with_http_info(app_id, journey_id, update_journey_request, opts)
2992
+ data
2993
+ end
2994
+
2995
+ # Update journey
2996
+ # The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a journey using JSON Merge Patch (RFC 7396). Send only the fields you want to change; omitted fields are left unchanged. A null value clears a nullable field, and arrays such as nodes are replaced wholesale. Set state to active to activate a draft journey.
2997
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
2998
+ # @param journey_id [String] UUID of the journey to update.
2999
+ # @param update_journey_request [UpdateJourneyRequest]
3000
+ # @param [Hash] opts the optional parameters
3001
+ # @return [Array<(Journey, Integer, Hash)>] Journey data, response status code and response headers
3002
+ def update_journey_with_http_info(app_id, journey_id, update_journey_request, opts = {})
3003
+ if @api_client.config.debugging
3004
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_journey ...'
3005
+ end
3006
+ # verify the required parameter 'app_id' is set
3007
+ if @api_client.config.client_side_validation && app_id.nil?
3008
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.update_journey"
3009
+ end
3010
+ # verify the required parameter 'journey_id' is set
3011
+ if @api_client.config.client_side_validation && journey_id.nil?
3012
+ fail ArgumentError, "Missing the required parameter 'journey_id' when calling DefaultApi.update_journey"
3013
+ end
3014
+ # verify the required parameter 'update_journey_request' is set
3015
+ if @api_client.config.client_side_validation && update_journey_request.nil?
3016
+ fail ArgumentError, "Missing the required parameter 'update_journey_request' when calling DefaultApi.update_journey"
3017
+ end
3018
+ # resource path
3019
+ local_var_path = '/apps/{app_id}/journeys/{journey_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'journey_id' + '}', CGI.escape(journey_id.to_s))
3020
+
3021
+ # query parameters
3022
+ query_params = opts[:query_params] || {}
3023
+
3024
+ # header parameters
3025
+ header_params = opts[:header_params] || {}
3026
+ # HTTP header 'Accept' (if needed)
3027
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3028
+ # HTTP header 'Content-Type'
3029
+ content_type = @api_client.select_header_content_type(['application/json'])
3030
+ if !content_type.nil?
3031
+ header_params['Content-Type'] = content_type
3032
+ end
3033
+
3034
+ # form parameters
3035
+ form_params = opts[:form_params] || {}
3036
+
3037
+ # http body (model)
3038
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_journey_request)
3039
+
3040
+ # return_type
3041
+ return_type = opts[:debug_return_type] || 'Journey'
3042
+
3043
+ # auth_names
3044
+ auth_names = opts[:debug_auth_names] || ['rest_api_key']
3045
+
3046
+ new_options = opts.merge(
3047
+ :operation => :"DefaultApi.update_journey",
3048
+ :header_params => header_params,
3049
+ :query_params => query_params,
3050
+ :form_params => form_params,
3051
+ :body => post_body,
3052
+ :auth_names => auth_names,
3053
+ :return_type => return_type
3054
+ )
3055
+
3056
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
3057
+ if @api_client.config.debugging
3058
+ @api_client.config.logger.debug "API called: DefaultApi#update_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3059
+ end
3060
+ return data, status_code, headers
3061
+ end
3062
+
3063
+ # Update journey node
3064
+ # The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a single node, located by its server-assigned id, using JSON Merge Patch (RFC 7396). Send only the node fields you want to change; the rest of the node and the rest of the journey graph are left untouched. Returns the full updated journey.
3065
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
3066
+ # @param journey_id [String] UUID of the journey that owns the node.
3067
+ # @param node_id [String] Server-assigned UUID of the node to update, from a prior View journey fetch.
3068
+ # @param update_journey_node_request [UpdateJourneyNodeRequest]
3069
+ # @param [Hash] opts the optional parameters
3070
+ # @return [Journey]
3071
+ def update_journey_node(app_id, journey_id, node_id, update_journey_node_request, opts = {})
3072
+ data, _status_code, _headers = update_journey_node_with_http_info(app_id, journey_id, node_id, update_journey_node_request, opts)
3073
+ data
3074
+ end
3075
+
3076
+ # Update journey node
3077
+ # The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a single node, located by its server-assigned id, using JSON Merge Patch (RFC 7396). Send only the node fields you want to change; the rest of the node and the rest of the journey graph are left untouched. Returns the full updated journey.
3078
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
3079
+ # @param journey_id [String] UUID of the journey that owns the node.
3080
+ # @param node_id [String] Server-assigned UUID of the node to update, from a prior View journey fetch.
3081
+ # @param update_journey_node_request [UpdateJourneyNodeRequest]
3082
+ # @param [Hash] opts the optional parameters
3083
+ # @return [Array<(Journey, Integer, Hash)>] Journey data, response status code and response headers
3084
+ def update_journey_node_with_http_info(app_id, journey_id, node_id, update_journey_node_request, opts = {})
3085
+ if @api_client.config.debugging
3086
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_journey_node ...'
3087
+ end
3088
+ # verify the required parameter 'app_id' is set
3089
+ if @api_client.config.client_side_validation && app_id.nil?
3090
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.update_journey_node"
3091
+ end
3092
+ # verify the required parameter 'journey_id' is set
3093
+ if @api_client.config.client_side_validation && journey_id.nil?
3094
+ fail ArgumentError, "Missing the required parameter 'journey_id' when calling DefaultApi.update_journey_node"
3095
+ end
3096
+ # verify the required parameter 'node_id' is set
3097
+ if @api_client.config.client_side_validation && node_id.nil?
3098
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling DefaultApi.update_journey_node"
3099
+ end
3100
+ # verify the required parameter 'update_journey_node_request' is set
3101
+ if @api_client.config.client_side_validation && update_journey_node_request.nil?
3102
+ fail ArgumentError, "Missing the required parameter 'update_journey_node_request' when calling DefaultApi.update_journey_node"
3103
+ end
3104
+ # resource path
3105
+ local_var_path = '/apps/{app_id}/journeys/{journey_id}/nodes/{node_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'journey_id' + '}', CGI.escape(journey_id.to_s)).sub('{' + 'node_id' + '}', CGI.escape(node_id.to_s))
3106
+
3107
+ # query parameters
3108
+ query_params = opts[:query_params] || {}
3109
+
3110
+ # header parameters
3111
+ header_params = opts[:header_params] || {}
3112
+ # HTTP header 'Accept' (if needed)
3113
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3114
+ # HTTP header 'Content-Type'
3115
+ content_type = @api_client.select_header_content_type(['application/json'])
3116
+ if !content_type.nil?
3117
+ header_params['Content-Type'] = content_type
3118
+ end
3119
+
3120
+ # form parameters
3121
+ form_params = opts[:form_params] || {}
3122
+
3123
+ # http body (model)
3124
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_journey_node_request)
3125
+
3126
+ # return_type
3127
+ return_type = opts[:debug_return_type] || 'Journey'
3128
+
3129
+ # auth_names
3130
+ auth_names = opts[:debug_auth_names] || ['rest_api_key']
3131
+
3132
+ new_options = opts.merge(
3133
+ :operation => :"DefaultApi.update_journey_node",
3134
+ :header_params => header_params,
3135
+ :query_params => query_params,
3136
+ :form_params => form_params,
3137
+ :body => post_body,
3138
+ :auth_names => auth_names,
3139
+ :return_type => return_type
3140
+ )
3141
+
3142
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
3143
+ if @api_client.config.debugging
3144
+ @api_client.config.logger.debug "API called: DefaultApi#update_journey_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3145
+ end
3146
+ return data, status_code, headers
3147
+ end
3148
+
2840
3149
  # Update a Live Activity via Push
2841
3150
  # Updates a specified live activity.
2842
3151
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
@@ -3385,6 +3694,221 @@ module OneSignal
3385
3694
  return data, status_code, headers
3386
3695
  end
3387
3696
 
3697
+ # View journey
3698
+ # The Journeys API is in beta. Endpoints and response fields can still change. Retrieve the full configuration of a single journey by its UUID, including its audience and node graph.
3699
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
3700
+ # @param journey_id [String] UUID of the journey to retrieve.
3701
+ # @param [Hash] opts the optional parameters
3702
+ # @return [Journey]
3703
+ def view_journey(app_id, journey_id, opts = {})
3704
+ data, _status_code, _headers = view_journey_with_http_info(app_id, journey_id, opts)
3705
+ data
3706
+ end
3707
+
3708
+ # View journey
3709
+ # The Journeys API is in beta. Endpoints and response fields can still change. Retrieve the full configuration of a single journey by its UUID, including its audience and node graph.
3710
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
3711
+ # @param journey_id [String] UUID of the journey to retrieve.
3712
+ # @param [Hash] opts the optional parameters
3713
+ # @return [Array<(Journey, Integer, Hash)>] Journey data, response status code and response headers
3714
+ def view_journey_with_http_info(app_id, journey_id, opts = {})
3715
+ if @api_client.config.debugging
3716
+ @api_client.config.logger.debug 'Calling API: DefaultApi.view_journey ...'
3717
+ end
3718
+ # verify the required parameter 'app_id' is set
3719
+ if @api_client.config.client_side_validation && app_id.nil?
3720
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.view_journey"
3721
+ end
3722
+ # verify the required parameter 'journey_id' is set
3723
+ if @api_client.config.client_side_validation && journey_id.nil?
3724
+ fail ArgumentError, "Missing the required parameter 'journey_id' when calling DefaultApi.view_journey"
3725
+ end
3726
+ # resource path
3727
+ local_var_path = '/apps/{app_id}/journeys/{journey_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'journey_id' + '}', CGI.escape(journey_id.to_s))
3728
+
3729
+ # query parameters
3730
+ query_params = opts[:query_params] || {}
3731
+
3732
+ # header parameters
3733
+ header_params = opts[:header_params] || {}
3734
+ # HTTP header 'Accept' (if needed)
3735
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3736
+
3737
+ # form parameters
3738
+ form_params = opts[:form_params] || {}
3739
+
3740
+ # http body (model)
3741
+ post_body = opts[:debug_body]
3742
+
3743
+ # return_type
3744
+ return_type = opts[:debug_return_type] || 'Journey'
3745
+
3746
+ # auth_names
3747
+ auth_names = opts[:debug_auth_names] || ['rest_api_key']
3748
+
3749
+ new_options = opts.merge(
3750
+ :operation => :"DefaultApi.view_journey",
3751
+ :header_params => header_params,
3752
+ :query_params => query_params,
3753
+ :form_params => form_params,
3754
+ :body => post_body,
3755
+ :auth_names => auth_names,
3756
+ :return_type => return_type
3757
+ )
3758
+
3759
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3760
+ if @api_client.config.debugging
3761
+ @api_client.config.logger.debug "API called: DefaultApi#view_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3762
+ end
3763
+ return data, status_code, headers
3764
+ end
3765
+
3766
+ # View journey stats
3767
+ # The Journeys API is in beta. Endpoints and response fields can still change. Retrieve performance stats for a single journey: journey-level entry and exit counts, per-node counts keyed by node id, per-branch counts keyed by branch id, and channel delivery stats for message-sending nodes. The response carries no definition detail, so join it by id against the journey from View journey.
3768
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
3769
+ # @param journey_id [String] UUID of the journey to retrieve stats for.
3770
+ # @param [Hash] opts the optional parameters
3771
+ # @return [JourneyStats]
3772
+ def view_journey_stats(app_id, journey_id, opts = {})
3773
+ data, _status_code, _headers = view_journey_stats_with_http_info(app_id, journey_id, opts)
3774
+ data
3775
+ end
3776
+
3777
+ # View journey stats
3778
+ # The Journeys API is in beta. Endpoints and response fields can still change. Retrieve performance stats for a single journey: journey-level entry and exit counts, per-node counts keyed by node id, per-branch counts keyed by branch id, and channel delivery stats for message-sending nodes. The response carries no definition detail, so join it by id against the journey from View journey.
3779
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
3780
+ # @param journey_id [String] UUID of the journey to retrieve stats for.
3781
+ # @param [Hash] opts the optional parameters
3782
+ # @return [Array<(JourneyStats, Integer, Hash)>] JourneyStats data, response status code and response headers
3783
+ def view_journey_stats_with_http_info(app_id, journey_id, opts = {})
3784
+ if @api_client.config.debugging
3785
+ @api_client.config.logger.debug 'Calling API: DefaultApi.view_journey_stats ...'
3786
+ end
3787
+ # verify the required parameter 'app_id' is set
3788
+ if @api_client.config.client_side_validation && app_id.nil?
3789
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.view_journey_stats"
3790
+ end
3791
+ # verify the required parameter 'journey_id' is set
3792
+ if @api_client.config.client_side_validation && journey_id.nil?
3793
+ fail ArgumentError, "Missing the required parameter 'journey_id' when calling DefaultApi.view_journey_stats"
3794
+ end
3795
+ # resource path
3796
+ local_var_path = '/apps/{app_id}/journeys/{journey_id}/stats'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'journey_id' + '}', CGI.escape(journey_id.to_s))
3797
+
3798
+ # query parameters
3799
+ query_params = opts[:query_params] || {}
3800
+
3801
+ # header parameters
3802
+ header_params = opts[:header_params] || {}
3803
+ # HTTP header 'Accept' (if needed)
3804
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3805
+
3806
+ # form parameters
3807
+ form_params = opts[:form_params] || {}
3808
+
3809
+ # http body (model)
3810
+ post_body = opts[:debug_body]
3811
+
3812
+ # return_type
3813
+ return_type = opts[:debug_return_type] || 'JourneyStats'
3814
+
3815
+ # auth_names
3816
+ auth_names = opts[:debug_auth_names] || ['rest_api_key']
3817
+
3818
+ new_options = opts.merge(
3819
+ :operation => :"DefaultApi.view_journey_stats",
3820
+ :header_params => header_params,
3821
+ :query_params => query_params,
3822
+ :form_params => form_params,
3823
+ :body => post_body,
3824
+ :auth_names => auth_names,
3825
+ :return_type => return_type
3826
+ )
3827
+
3828
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3829
+ if @api_client.config.debugging
3830
+ @api_client.config.logger.debug "API called: DefaultApi#view_journey_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3831
+ end
3832
+ return data, status_code, headers
3833
+ end
3834
+
3835
+ # View journeys
3836
+ # The Journeys API is in beta. Endpoints and response fields can still change. Retrieve a paginated list of journeys for an app. Returns a summary representation of each journey; use View journey for the full configuration. Uses forward-only cursor-based pagination.
3837
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
3838
+ # @param [Hash] opts the optional parameters
3839
+ # @option opts [String] :cursor Opaque pagination token from a previous response&#39;s next_cursor. Omit for the first page.
3840
+ # @option opts [Integer] :limit Maximum journeys to return per page. Minimum 1, maximum 50. (default to 50)
3841
+ # @return [JourneyListResponse]
3842
+ def view_journeys(app_id, opts = {})
3843
+ data, _status_code, _headers = view_journeys_with_http_info(app_id, opts)
3844
+ data
3845
+ end
3846
+
3847
+ # View journeys
3848
+ # The Journeys API is in beta. Endpoints and response fields can still change. Retrieve a paginated list of journeys for an app. Returns a summary representation of each journey; use View journey for the full configuration. Uses forward-only cursor-based pagination.
3849
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
3850
+ # @param [Hash] opts the optional parameters
3851
+ # @option opts [String] :cursor Opaque pagination token from a previous response&#39;s next_cursor. Omit for the first page.
3852
+ # @option opts [Integer] :limit Maximum journeys to return per page. Minimum 1, maximum 50. (default to 50)
3853
+ # @return [Array<(JourneyListResponse, Integer, Hash)>] JourneyListResponse data, response status code and response headers
3854
+ def view_journeys_with_http_info(app_id, opts = {})
3855
+ if @api_client.config.debugging
3856
+ @api_client.config.logger.debug 'Calling API: DefaultApi.view_journeys ...'
3857
+ end
3858
+ # verify the required parameter 'app_id' is set
3859
+ if @api_client.config.client_side_validation && app_id.nil?
3860
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.view_journeys"
3861
+ end
3862
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
3863
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.view_journeys, must be smaller than or equal to 50.'
3864
+ end
3865
+
3866
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
3867
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.view_journeys, must be greater than or equal to 1.'
3868
+ end
3869
+
3870
+ # resource path
3871
+ local_var_path = '/apps/{app_id}/journeys'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
3872
+
3873
+ # query parameters
3874
+ query_params = opts[:query_params] || {}
3875
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
3876
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
3877
+
3878
+ # header parameters
3879
+ header_params = opts[:header_params] || {}
3880
+ # HTTP header 'Accept' (if needed)
3881
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3882
+
3883
+ # form parameters
3884
+ form_params = opts[:form_params] || {}
3885
+
3886
+ # http body (model)
3887
+ post_body = opts[:debug_body]
3888
+
3889
+ # return_type
3890
+ return_type = opts[:debug_return_type] || 'JourneyListResponse'
3891
+
3892
+ # auth_names
3893
+ auth_names = opts[:debug_auth_names] || ['rest_api_key']
3894
+
3895
+ new_options = opts.merge(
3896
+ :operation => :"DefaultApi.view_journeys",
3897
+ :header_params => header_params,
3898
+ :query_params => query_params,
3899
+ :form_params => form_params,
3900
+ :body => post_body,
3901
+ :auth_names => auth_names,
3902
+ :return_type => return_type
3903
+ )
3904
+
3905
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3906
+ if @api_client.config.debugging
3907
+ @api_client.config.logger.debug "API called: DefaultApi#view_journeys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3908
+ end
3909
+ return data, status_code, headers
3910
+ end
3911
+
3388
3912
  # View template
3389
3913
  # Fetch a single template by id.
3390
3914
  # @param template_id [String]
@@ -89,7 +89,7 @@ module OneSignal
89
89
  url = build_request_url(path, opts)
90
90
  http_method = http_method.to_sym.downcase
91
91
 
92
- opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.11.2'
92
+ opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.13.0'
93
93
  header_params = @default_headers.merge(opts[:header_params] || {})
94
94
  query_params = opts[:query_params] || {}
95
95
  form_params = opts[:form_params] || {}