launchdarkly_api 2.0.10 → 2.0.27

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 (276) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +153 -151
  3. data/docs/AuditLogApi.md +7 -7
  4. data/docs/{Action.md → CopyActions.md} +1 -1
  5. data/docs/CustomProperty.md +1 -1
  6. data/docs/CustomRole.md +1 -1
  7. data/docs/CustomRoleBody.md +1 -1
  8. data/docs/CustomRoles.md +1 -1
  9. data/docs/CustomRolesApi.md +7 -6
  10. data/docs/CustomerMetricsApi.md +511 -0
  11. data/docs/DataExportDestinationsApi.md +293 -0
  12. data/docs/Destination.md +14 -0
  13. data/docs/DestinationAmazonKinesis.md +10 -0
  14. data/docs/DestinationBody.md +11 -0
  15. data/docs/DestinationGooglePubSub.md +9 -0
  16. data/docs/DestinationMParticle.md +11 -0
  17. data/docs/{CustomRoleKeyOrId.md → DestinationSegment.md} +2 -1
  18. data/docs/Destinations.md +9 -0
  19. data/docs/Environment.md +2 -0
  20. data/docs/EnvironmentPost.md +5 -0
  21. data/docs/EnvironmentsApi.md +11 -10
  22. data/docs/EvaluationUsageError.md +9 -0
  23. data/docs/Events.md +8 -0
  24. data/docs/FeatureFlag.md +4 -1
  25. data/docs/FeatureFlagConfig.md +0 -1
  26. data/docs/FeatureFlagCopyBody.md +12 -0
  27. data/docs/FeatureFlagCopyObject.md +9 -0
  28. data/docs/FeatureFlagStatus.md +1 -1
  29. data/docs/FeatureFlagStatusAcrossEnvironments.md +10 -0
  30. data/docs/FeatureFlagStatusForQueriedEnvironment.md +10 -0
  31. data/docs/FeatureFlagsApi.md +136 -17
  32. data/docs/MAU.md +10 -0
  33. data/docs/{Actions.md → MAUMetadata.md} +1 -1
  34. data/docs/MAUbyCategory.md +10 -0
  35. data/docs/Member.md +2 -0
  36. data/docs/Members.md +1 -1
  37. data/docs/MembersBody.md +1 -1
  38. data/docs/Policy.md +4 -2
  39. data/docs/ProjectBody.md +2 -0
  40. data/docs/ProjectsApi.md +7 -6
  41. data/docs/Rollout.md +1 -0
  42. data/docs/Statement.md +4 -4
  43. data/docs/Stream.md +10 -0
  44. data/docs/StreamBySDK.md +10 -0
  45. data/docs/StreamBySDKLinks.md +9 -0
  46. data/docs/StreamBySDKLinksMetadata.md +10 -0
  47. data/docs/StreamLinks.md +10 -0
  48. data/docs/StreamSDKVersion.md +9 -0
  49. data/docs/StreamSDKVersionData.md +9 -0
  50. data/docs/StreamUsageError.md +9 -0
  51. data/docs/StreamUsageLinks.md +10 -0
  52. data/docs/StreamUsageMetadata.md +10 -0
  53. data/docs/StreamUsageSeries.md +9 -0
  54. data/docs/Streams.md +8 -0
  55. data/docs/TeamMembersApi.md +7 -6
  56. data/docs/Usage.md +9 -0
  57. data/docs/{CustomProperties.md → UsageError.md} +2 -1
  58. data/docs/UsageLinks.md +10 -0
  59. data/docs/UserSegmentsApi.md +18 -17
  60. data/docs/UserSettingsApi.md +11 -11
  61. data/docs/UsersApi.md +15 -15
  62. data/docs/Webhook.md +1 -0
  63. data/docs/WebhookBody.md +2 -0
  64. data/docs/WebhooksApi.md +7 -6
  65. data/launchdarkly_api.gemspec +5 -6
  66. data/lib/launchdarkly_api/api/audit_log_api.rb +13 -19
  67. data/lib/launchdarkly_api/api/custom_roles_api.rb +23 -37
  68. data/lib/launchdarkly_api/api/customer_metrics_api.rb +519 -0
  69. data/lib/launchdarkly_api/api/data_export_destinations_api.rb +330 -0
  70. data/lib/launchdarkly_api/api/environments_api.rb +20 -31
  71. data/lib/launchdarkly_api/api/feature_flags_api.rb +150 -43
  72. data/lib/launchdarkly_api/api/projects_api.rb +23 -37
  73. data/lib/launchdarkly_api/api/root_api.rb +6 -9
  74. data/lib/launchdarkly_api/api/team_members_api.rb +23 -37
  75. data/lib/launchdarkly_api/api/user_segments_api.rb +23 -37
  76. data/lib/launchdarkly_api/api/user_settings_api.rb +12 -21
  77. data/lib/launchdarkly_api/api/users_api.rb +17 -29
  78. data/lib/launchdarkly_api/api/webhooks_api.rb +23 -37
  79. data/lib/launchdarkly_api/api_client.rb +10 -10
  80. data/lib/launchdarkly_api/api_error.rb +2 -2
  81. data/lib/launchdarkly_api/configuration.rb +3 -3
  82. data/lib/launchdarkly_api/models/audit_log_entries.rb +7 -12
  83. data/lib/launchdarkly_api/models/audit_log_entry.rb +7 -12
  84. data/lib/launchdarkly_api/models/audit_log_entry_target.rb +7 -12
  85. data/lib/launchdarkly_api/models/clause.rb +7 -12
  86. data/lib/launchdarkly_api/models/copy_actions.rb +34 -0
  87. data/lib/launchdarkly_api/models/custom_property.rb +13 -14
  88. data/lib/launchdarkly_api/models/custom_property_values.rb +7 -11
  89. data/lib/launchdarkly_api/models/custom_role.rb +9 -13
  90. data/lib/launchdarkly_api/models/custom_role_body.rb +12 -16
  91. data/lib/launchdarkly_api/models/custom_roles.rb +11 -14
  92. data/lib/launchdarkly_api/models/destination.rb +276 -0
  93. data/lib/launchdarkly_api/models/destination_amazon_kinesis.rb +201 -0
  94. data/lib/launchdarkly_api/models/destination_body.rb +263 -0
  95. data/lib/launchdarkly_api/models/destination_google_pub_sub.rb +192 -0
  96. data/lib/launchdarkly_api/models/destination_m_particle.rb +210 -0
  97. data/lib/launchdarkly_api/models/destination_segment.rb +183 -0
  98. data/lib/launchdarkly_api/models/destinations.rb +194 -0
  99. data/lib/launchdarkly_api/models/environment.rb +29 -14
  100. data/lib/launchdarkly_api/models/environment_post.rb +64 -17
  101. data/lib/launchdarkly_api/models/evaluation_usage_error.rb +192 -0
  102. data/lib/launchdarkly_api/models/{action.rb → events.rb} +17 -13
  103. data/lib/launchdarkly_api/models/fallthrough.rb +7 -12
  104. data/lib/launchdarkly_api/models/feature_flag.rb +46 -16
  105. data/lib/launchdarkly_api/models/feature_flag_body.rb +10 -15
  106. data/lib/launchdarkly_api/models/feature_flag_config.rb +8 -24
  107. data/lib/launchdarkly_api/models/feature_flag_copy_body.rb +226 -0
  108. data/lib/launchdarkly_api/models/feature_flag_copy_object.rb +199 -0
  109. data/lib/launchdarkly_api/models/feature_flag_status.rb +22 -26
  110. data/lib/launchdarkly_api/models/feature_flag_status_across_environments.rb +203 -0
  111. data/lib/launchdarkly_api/models/feature_flag_status_for_queried_environment.rb +236 -0
  112. data/lib/launchdarkly_api/models/feature_flag_statuses.rb +7 -12
  113. data/lib/launchdarkly_api/models/feature_flags.rb +7 -12
  114. data/lib/launchdarkly_api/models/id.rb +7 -11
  115. data/lib/launchdarkly_api/models/link.rb +7 -12
  116. data/lib/launchdarkly_api/models/links.rb +7 -12
  117. data/lib/launchdarkly_api/models/ma_uby_category.rb +205 -0
  118. data/lib/launchdarkly_api/models/mau.rb +205 -0
  119. data/lib/launchdarkly_api/models/{actions.rb → mau_metadata.rb} +8 -13
  120. data/lib/launchdarkly_api/models/member.rb +26 -13
  121. data/lib/launchdarkly_api/models/members.rb +11 -14
  122. data/lib/launchdarkly_api/models/members_body.rb +9 -14
  123. data/lib/launchdarkly_api/models/patch_comment.rb +7 -12
  124. data/lib/launchdarkly_api/models/patch_operation.rb +10 -15
  125. data/lib/launchdarkly_api/models/policy.rb +40 -17
  126. data/lib/launchdarkly_api/models/prerequisite.rb +7 -12
  127. data/lib/launchdarkly_api/models/project.rb +7 -12
  128. data/lib/launchdarkly_api/models/project_body.rb +30 -15
  129. data/lib/launchdarkly_api/models/projects.rb +7 -12
  130. data/lib/launchdarkly_api/models/role.rb +7 -8
  131. data/lib/launchdarkly_api/models/rollout.rb +17 -13
  132. data/lib/launchdarkly_api/models/rule.rb +7 -12
  133. data/lib/launchdarkly_api/models/statement.rb +35 -31
  134. data/lib/launchdarkly_api/models/statements.rb +7 -12
  135. data/lib/launchdarkly_api/models/stream.rb +205 -0
  136. data/lib/launchdarkly_api/models/stream_by_sdk.rb +205 -0
  137. data/lib/launchdarkly_api/models/stream_by_sdk_links.rb +192 -0
  138. data/lib/launchdarkly_api/models/{resources.rb → stream_by_sdk_links_metadata.rb} +34 -12
  139. data/lib/launchdarkly_api/models/stream_links.rb +204 -0
  140. data/lib/launchdarkly_api/models/stream_sdk_version.rb +194 -0
  141. data/lib/launchdarkly_api/models/stream_sdk_version_data.rb +194 -0
  142. data/lib/launchdarkly_api/models/stream_usage_error.rb +192 -0
  143. data/lib/launchdarkly_api/models/stream_usage_links.rb +204 -0
  144. data/lib/launchdarkly_api/models/stream_usage_metadata.rb +203 -0
  145. data/lib/launchdarkly_api/models/stream_usage_series.rb +194 -0
  146. data/lib/launchdarkly_api/models/{custom_properties.rb → streams.rb} +17 -13
  147. data/lib/launchdarkly_api/models/target.rb +7 -12
  148. data/lib/launchdarkly_api/models/usage.rb +194 -0
  149. data/lib/launchdarkly_api/models/{custom_role_key_or_id.rb → usage_error.rb} +17 -13
  150. data/lib/launchdarkly_api/models/usage_links.rb +204 -0
  151. data/lib/launchdarkly_api/models/user.rb +7 -12
  152. data/lib/launchdarkly_api/models/user_flag_setting.rb +7 -12
  153. data/lib/launchdarkly_api/models/user_flag_settings.rb +7 -12
  154. data/lib/launchdarkly_api/models/user_record.rb +7 -12
  155. data/lib/launchdarkly_api/models/user_segment.rb +10 -15
  156. data/lib/launchdarkly_api/models/user_segment_body.rb +9 -14
  157. data/lib/launchdarkly_api/models/user_segment_rule.rb +7 -12
  158. data/lib/launchdarkly_api/models/user_segments.rb +7 -12
  159. data/lib/launchdarkly_api/models/user_settings_body.rb +7 -12
  160. data/lib/launchdarkly_api/models/users.rb +7 -12
  161. data/lib/launchdarkly_api/models/variation.rb +8 -13
  162. data/lib/launchdarkly_api/models/webhook.rb +17 -13
  163. data/lib/launchdarkly_api/models/webhook_body.rb +33 -17
  164. data/lib/launchdarkly_api/models/webhooks.rb +7 -12
  165. data/lib/launchdarkly_api/models/weighted_variation.rb +7 -12
  166. data/lib/launchdarkly_api/version.rb +3 -3
  167. data/lib/launchdarkly_api.rb +36 -8
  168. data/openapi.yml +1004 -115
  169. data/spec/api/audit_log_api_spec.rb +6 -8
  170. data/spec/api/custom_roles_api_spec.rb +8 -13
  171. data/spec/api/customer_metrics_api_spec.rb +141 -0
  172. data/spec/api/data_export_destinations_api_spec.rb +98 -0
  173. data/spec/api/environments_api_spec.rb +7 -11
  174. data/spec/api/feature_flags_api_spec.rb +36 -16
  175. data/spec/api/projects_api_spec.rb +8 -13
  176. data/spec/api/root_api_spec.rb +3 -4
  177. data/spec/api/team_members_api_spec.rb +8 -13
  178. data/spec/api/user_segments_api_spec.rb +8 -13
  179. data/spec/api/user_settings_api_spec.rb +5 -8
  180. data/spec/api/users_api_spec.rb +7 -11
  181. data/spec/api/webhooks_api_spec.rb +8 -13
  182. data/spec/api_client_spec.rb +36 -36
  183. data/spec/configuration_spec.rb +10 -10
  184. data/spec/models/audit_log_entries_spec.rb +4 -5
  185. data/spec/models/audit_log_entry_spec.rb +14 -15
  186. data/spec/models/audit_log_entry_target_spec.rb +5 -6
  187. data/spec/models/clause_spec.rb +6 -7
  188. data/spec/models/{action_spec.rb → copy_actions_spec.rb} +8 -9
  189. data/spec/models/custom_property_spec.rb +4 -5
  190. data/spec/models/custom_property_values_spec.rb +2 -3
  191. data/spec/models/custom_role_body_spec.rb +6 -7
  192. data/spec/models/custom_role_spec.rb +8 -9
  193. data/spec/models/custom_roles_spec.rb +4 -5
  194. data/spec/models/destination_amazon_kinesis_spec.rb +53 -0
  195. data/spec/models/destination_body_spec.rb +63 -0
  196. data/spec/models/destination_google_pub_sub_spec.rb +47 -0
  197. data/spec/models/destination_m_particle_spec.rb +59 -0
  198. data/spec/models/destination_segment_spec.rb +41 -0
  199. data/spec/models/destination_spec.rb +81 -0
  200. data/spec/models/destinations_spec.rb +47 -0
  201. data/spec/models/environment_post_spec.rb +36 -7
  202. data/spec/models/environment_spec.rb +25 -14
  203. data/spec/models/evaluation_usage_error_spec.rb +47 -0
  204. data/spec/models/events_spec.rb +41 -0
  205. data/spec/models/fallthrough_spec.rb +4 -5
  206. data/spec/models/feature_flag_body_spec.rb +9 -10
  207. data/spec/models/feature_flag_config_spec.rb +14 -21
  208. data/spec/models/feature_flag_copy_body_spec.rb +65 -0
  209. data/spec/models/feature_flag_copy_object_spec.rb +47 -0
  210. data/spec/models/feature_flag_spec.rb +35 -18
  211. data/spec/models/feature_flag_status_across_environments_spec.rb +53 -0
  212. data/spec/models/feature_flag_status_for_queried_environment_spec.rb +57 -0
  213. data/spec/models/feature_flag_status_spec.rb +14 -15
  214. data/spec/models/feature_flag_statuses_spec.rb +4 -5
  215. data/spec/models/feature_flags_spec.rb +4 -5
  216. data/spec/models/id_spec.rb +2 -3
  217. data/spec/models/link_spec.rb +4 -5
  218. data/spec/models/links_spec.rb +4 -5
  219. data/spec/models/ma_uby_category_spec.rb +53 -0
  220. data/spec/models/{actions_spec.rb → mau_metadata_spec.rb} +8 -9
  221. data/spec/models/mau_spec.rb +53 -0
  222. data/spec/models/member_spec.rb +21 -10
  223. data/spec/models/members_body_spec.rb +8 -9
  224. data/spec/models/members_spec.rb +4 -5
  225. data/spec/models/patch_comment_spec.rb +4 -5
  226. data/spec/models/patch_operation_spec.rb +5 -6
  227. data/spec/models/policy_spec.rb +17 -6
  228. data/spec/models/prerequisite_spec.rb +4 -5
  229. data/spec/models/project_body_spec.rb +17 -6
  230. data/spec/models/project_spec.rb +8 -9
  231. data/spec/models/projects_spec.rb +4 -5
  232. data/spec/models/role_spec.rb +2 -3
  233. data/spec/models/rollout_spec.rb +9 -4
  234. data/spec/models/rule_spec.rb +6 -7
  235. data/spec/models/statement_spec.rb +13 -14
  236. data/spec/models/statements_spec.rb +2 -3
  237. data/spec/models/stream_by_sdk_links_metadata_spec.rb +53 -0
  238. data/spec/models/stream_by_sdk_links_spec.rb +47 -0
  239. data/spec/models/stream_by_sdk_spec.rb +53 -0
  240. data/spec/models/stream_links_spec.rb +53 -0
  241. data/spec/models/stream_sdk_version_data_spec.rb +47 -0
  242. data/spec/models/stream_sdk_version_spec.rb +47 -0
  243. data/spec/models/stream_spec.rb +53 -0
  244. data/spec/models/stream_usage_error_spec.rb +47 -0
  245. data/spec/models/stream_usage_links_spec.rb +53 -0
  246. data/spec/models/stream_usage_metadata_spec.rb +53 -0
  247. data/spec/models/stream_usage_series_spec.rb +47 -0
  248. data/spec/models/streams_spec.rb +41 -0
  249. data/spec/models/target_spec.rb +4 -5
  250. data/spec/models/usage_error_spec.rb +41 -0
  251. data/spec/models/usage_links_spec.rb +53 -0
  252. data/spec/models/usage_spec.rb +47 -0
  253. data/spec/models/user_flag_setting_spec.rb +5 -6
  254. data/spec/models/user_flag_settings_spec.rb +4 -5
  255. data/spec/models/user_record_spec.rb +7 -8
  256. data/spec/models/user_segment_body_spec.rb +6 -7
  257. data/spec/models/user_segment_rule_spec.rb +5 -6
  258. data/spec/models/user_segment_spec.rb +12 -13
  259. data/spec/models/user_segments_spec.rb +4 -5
  260. data/spec/models/user_settings_body_spec.rb +3 -4
  261. data/spec/models/user_spec.rb +13 -14
  262. data/spec/models/users_spec.rb +5 -6
  263. data/spec/models/variation_spec.rb +5 -6
  264. data/spec/models/webhook_body_spec.rb +19 -8
  265. data/spec/models/webhook_spec.rb +15 -10
  266. data/spec/models/webhooks_spec.rb +4 -5
  267. data/spec/models/weighted_variation_spec.rb +4 -5
  268. data/spec/spec_helper.rb +2 -2
  269. metadata +187 -74
  270. data/docs/Resource.md +0 -7
  271. data/docs/Resources.md +0 -7
  272. data/lib/launchdarkly_api/models/resource.rb +0 -179
  273. data/spec/models/custom_properties_spec.rb +0 -36
  274. data/spec/models/custom_role_key_or_id_spec.rb +0 -36
  275. data/spec/models/resource_spec.rb +0 -36
  276. data/spec/models/resources_spec.rb +0 -36
@@ -0,0 +1,330 @@
1
+ =begin
2
+ #LaunchDarkly REST API
3
+
4
+ #Build custom integrations with the LaunchDarkly REST API
5
+
6
+ OpenAPI spec version: 2.0.27
7
+ Contact: support@launchdarkly.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.8
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module LaunchDarklyApi
16
+ class DataExportDestinationsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get a single data export destination by ID
23
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
24
+ # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
25
+ # @param destination_id The data export destination ID.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [nil]
28
+ def delete_destination(project_key, environment_key, destination_id, opts = {})
29
+ delete_destination_with_http_info(project_key, environment_key, destination_id, opts)
30
+ nil
31
+ end
32
+
33
+ # Get a single data export destination by ID
34
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
35
+ # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
36
+ # @param destination_id The data export destination ID.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
39
+ def delete_destination_with_http_info(project_key, environment_key, destination_id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.delete_destination ...'
42
+ end
43
+ # verify the required parameter 'project_key' is set
44
+ if @api_client.config.client_side_validation && project_key.nil?
45
+ fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.delete_destination"
46
+ end
47
+ # verify the required parameter 'environment_key' is set
48
+ if @api_client.config.client_side_validation && environment_key.nil?
49
+ fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.delete_destination"
50
+ end
51
+ # verify the required parameter 'destination_id' is set
52
+ if @api_client.config.client_side_validation && destination_id.nil?
53
+ fail ArgumentError, "Missing the required parameter 'destination_id' when calling DataExportDestinationsApi.delete_destination"
54
+ end
55
+ # resource path
56
+ local_var_path = '/destinations/{projectKey}/{environmentKey}/{destinationId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'destinationId' + '}', destination_id.to_s)
57
+
58
+ # query parameters
59
+ query_params = {}
60
+
61
+ # header parameters
62
+ header_params = {}
63
+ # HTTP header 'Accept' (if needed)
64
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
65
+ # HTTP header 'Content-Type'
66
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
67
+
68
+ # form parameters
69
+ form_params = {}
70
+
71
+ # http body (model)
72
+ post_body = nil
73
+ auth_names = ['Token']
74
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: DataExportDestinationsApi#delete_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+ # Get a single data export destination by ID
86
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
87
+ # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
88
+ # @param destination_id The data export destination ID.
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [Destination]
91
+ def get_destination(project_key, environment_key, destination_id, opts = {})
92
+ data, _status_code, _headers = get_destination_with_http_info(project_key, environment_key, destination_id, opts)
93
+ data
94
+ end
95
+
96
+ # Get a single data export destination by ID
97
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
98
+ # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
99
+ # @param destination_id The data export destination ID.
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [Array<(Destination, Fixnum, Hash)>] Destination data, response status code and response headers
102
+ def get_destination_with_http_info(project_key, environment_key, destination_id, opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.get_destination ...'
105
+ end
106
+ # verify the required parameter 'project_key' is set
107
+ if @api_client.config.client_side_validation && project_key.nil?
108
+ fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.get_destination"
109
+ end
110
+ # verify the required parameter 'environment_key' is set
111
+ if @api_client.config.client_side_validation && environment_key.nil?
112
+ fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.get_destination"
113
+ end
114
+ # verify the required parameter 'destination_id' is set
115
+ if @api_client.config.client_side_validation && destination_id.nil?
116
+ fail ArgumentError, "Missing the required parameter 'destination_id' when calling DataExportDestinationsApi.get_destination"
117
+ end
118
+ # resource path
119
+ local_var_path = '/destinations/{projectKey}/{environmentKey}/{destinationId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'destinationId' + '}', destination_id.to_s)
120
+
121
+ # query parameters
122
+ query_params = {}
123
+
124
+ # header parameters
125
+ header_params = {}
126
+ # HTTP header 'Accept' (if needed)
127
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
128
+ # HTTP header 'Content-Type'
129
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
130
+
131
+ # form parameters
132
+ form_params = {}
133
+
134
+ # http body (model)
135
+ post_body = nil
136
+ auth_names = ['Token']
137
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => 'Destination')
144
+ if @api_client.config.debugging
145
+ @api_client.config.logger.debug "API called: DataExportDestinationsApi#get_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
+ end
147
+ return data, status_code, headers
148
+ end
149
+ # Returns a list of all data export destinations.
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [Destinations]
152
+ def get_destinations(opts = {})
153
+ data, _status_code, _headers = get_destinations_with_http_info(opts)
154
+ data
155
+ end
156
+
157
+ # Returns a list of all data export destinations.
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [Array<(Destinations, Fixnum, Hash)>] Destinations data, response status code and response headers
160
+ def get_destinations_with_http_info(opts = {})
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.get_destinations ...'
163
+ end
164
+ # resource path
165
+ local_var_path = '/destinations'
166
+
167
+ # query parameters
168
+ query_params = {}
169
+
170
+ # header parameters
171
+ header_params = {}
172
+ # HTTP header 'Accept' (if needed)
173
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
174
+ # HTTP header 'Content-Type'
175
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
176
+
177
+ # form parameters
178
+ form_params = {}
179
+
180
+ # http body (model)
181
+ post_body = nil
182
+ auth_names = ['Token']
183
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
184
+ :header_params => header_params,
185
+ :query_params => query_params,
186
+ :form_params => form_params,
187
+ :body => post_body,
188
+ :auth_names => auth_names,
189
+ :return_type => 'Destinations')
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug "API called: DataExportDestinationsApi#get_destinations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
192
+ end
193
+ return data, status_code, headers
194
+ end
195
+ # Perform a partial update to a data export destination.
196
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
197
+ # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
198
+ # @param destination_id The data export destination ID.
199
+ # @param patch_only Requires a JSON Patch representation of the desired changes to the project. &#39;http://jsonpatch.com/&#39; Feature flag patches also support JSON Merge Patch format. &#39;https://tools.ietf.org/html/rfc7386&#39; The addition of comments is also supported.
200
+ # @param [Hash] opts the optional parameters
201
+ # @return [Destination]
202
+ def patch_destination(project_key, environment_key, destination_id, patch_only, opts = {})
203
+ data, _status_code, _headers = patch_destination_with_http_info(project_key, environment_key, destination_id, patch_only, opts)
204
+ data
205
+ end
206
+
207
+ # Perform a partial update to a data export destination.
208
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
209
+ # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
210
+ # @param destination_id The data export destination ID.
211
+ # @param patch_only Requires a JSON Patch representation of the desired changes to the project. &#39;http://jsonpatch.com/&#39; Feature flag patches also support JSON Merge Patch format. &#39;https://tools.ietf.org/html/rfc7386&#39; The addition of comments is also supported.
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [Array<(Destination, Fixnum, Hash)>] Destination data, response status code and response headers
214
+ def patch_destination_with_http_info(project_key, environment_key, destination_id, patch_only, opts = {})
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.patch_destination ...'
217
+ end
218
+ # verify the required parameter 'project_key' is set
219
+ if @api_client.config.client_side_validation && project_key.nil?
220
+ fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.patch_destination"
221
+ end
222
+ # verify the required parameter 'environment_key' is set
223
+ if @api_client.config.client_side_validation && environment_key.nil?
224
+ fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.patch_destination"
225
+ end
226
+ # verify the required parameter 'destination_id' is set
227
+ if @api_client.config.client_side_validation && destination_id.nil?
228
+ fail ArgumentError, "Missing the required parameter 'destination_id' when calling DataExportDestinationsApi.patch_destination"
229
+ end
230
+ # verify the required parameter 'patch_only' is set
231
+ if @api_client.config.client_side_validation && patch_only.nil?
232
+ fail ArgumentError, "Missing the required parameter 'patch_only' when calling DataExportDestinationsApi.patch_destination"
233
+ end
234
+ # resource path
235
+ local_var_path = '/destinations/{projectKey}/{environmentKey}/{destinationId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'destinationId' + '}', destination_id.to_s)
236
+
237
+ # query parameters
238
+ query_params = {}
239
+
240
+ # header parameters
241
+ header_params = {}
242
+ # HTTP header 'Accept' (if needed)
243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
244
+ # HTTP header 'Content-Type'
245
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
246
+
247
+ # form parameters
248
+ form_params = {}
249
+
250
+ # http body (model)
251
+ post_body = @api_client.object_to_http_body(patch_only)
252
+ auth_names = ['Token']
253
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
254
+ :header_params => header_params,
255
+ :query_params => query_params,
256
+ :form_params => form_params,
257
+ :body => post_body,
258
+ :auth_names => auth_names,
259
+ :return_type => 'Destination')
260
+ if @api_client.config.debugging
261
+ @api_client.config.logger.debug "API called: DataExportDestinationsApi#patch_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
262
+ end
263
+ return data, status_code, headers
264
+ end
265
+ # Create a new data export destination
266
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
267
+ # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
268
+ # @param destination_body Create a new data export destination.
269
+ # @param [Hash] opts the optional parameters
270
+ # @return [Destination]
271
+ def post_destination(project_key, environment_key, destination_body, opts = {})
272
+ data, _status_code, _headers = post_destination_with_http_info(project_key, environment_key, destination_body, opts)
273
+ data
274
+ end
275
+
276
+ # Create a new data export destination
277
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
278
+ # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
279
+ # @param destination_body Create a new data export destination.
280
+ # @param [Hash] opts the optional parameters
281
+ # @return [Array<(Destination, Fixnum, Hash)>] Destination data, response status code and response headers
282
+ def post_destination_with_http_info(project_key, environment_key, destination_body, opts = {})
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.post_destination ...'
285
+ end
286
+ # verify the required parameter 'project_key' is set
287
+ if @api_client.config.client_side_validation && project_key.nil?
288
+ fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.post_destination"
289
+ end
290
+ # verify the required parameter 'environment_key' is set
291
+ if @api_client.config.client_side_validation && environment_key.nil?
292
+ fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.post_destination"
293
+ end
294
+ # verify the required parameter 'destination_body' is set
295
+ if @api_client.config.client_side_validation && destination_body.nil?
296
+ fail ArgumentError, "Missing the required parameter 'destination_body' when calling DataExportDestinationsApi.post_destination"
297
+ end
298
+ # resource path
299
+ local_var_path = '/destinations/{projectKey}/{environmentKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)
300
+
301
+ # query parameters
302
+ query_params = {}
303
+
304
+ # header parameters
305
+ header_params = {}
306
+ # HTTP header 'Accept' (if needed)
307
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
308
+ # HTTP header 'Content-Type'
309
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
310
+
311
+ # form parameters
312
+ form_params = {}
313
+
314
+ # http body (model)
315
+ post_body = @api_client.object_to_http_body(destination_body)
316
+ auth_names = ['Token']
317
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
318
+ :header_params => header_params,
319
+ :query_params => query_params,
320
+ :form_params => form_params,
321
+ :body => post_body,
322
+ :auth_names => auth_names,
323
+ :return_type => 'Destination')
324
+ if @api_client.config.debugging
325
+ @api_client.config.logger.debug "API called: DataExportDestinationsApi#post_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
326
+ end
327
+ return data, status_code, headers
328
+ end
329
+ end
330
+ end
@@ -3,14 +3,14 @@
3
3
 
4
4
  #Build custom integrations with the LaunchDarkly REST API
5
5
 
6
- OpenAPI spec version: 2.0.10
6
+ OpenAPI spec version: 2.0.27
7
7
  Contact: support@launchdarkly.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.8
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module LaunchDarklyApi
16
16
  class EnvironmentsApi
@@ -19,27 +19,24 @@ module LaunchDarklyApi
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Delete an environment in a specific project.
24
- #
25
23
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
26
24
  # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
27
25
  # @param [Hash] opts the optional parameters
28
26
  # @return [nil]
29
27
  def delete_environment(project_key, environment_key, opts = {})
30
28
  delete_environment_with_http_info(project_key, environment_key, opts)
31
- return nil
29
+ nil
32
30
  end
33
31
 
34
32
  # Delete an environment in a specific project.
35
- #
36
33
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
37
34
  # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
38
35
  # @param [Hash] opts the optional parameters
39
36
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
40
37
  def delete_environment_with_http_info(project_key, environment_key, opts = {})
41
38
  if @api_client.config.debugging
42
- @api_client.config.logger.debug "Calling API: EnvironmentsApi.delete_environment ..."
39
+ @api_client.config.logger.debug 'Calling API: EnvironmentsApi.delete_environment ...'
43
40
  end
44
41
  # verify the required parameter 'project_key' is set
45
42
  if @api_client.config.client_side_validation && project_key.nil?
@@ -50,7 +47,7 @@ module LaunchDarklyApi
50
47
  fail ArgumentError, "Missing the required parameter 'environment_key' when calling EnvironmentsApi.delete_environment"
51
48
  end
52
49
  # resource path
53
- local_var_path = "/projects/{projectKey}/environments/{environmentKey}".sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)
50
+ local_var_path = '/projects/{projectKey}/environments/{environmentKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)
54
51
 
55
52
  # query parameters
56
53
  query_params = {}
@@ -79,27 +76,24 @@ module LaunchDarklyApi
79
76
  end
80
77
  return data, status_code, headers
81
78
  end
82
-
83
79
  # Get an environment given a project and key.
84
- #
85
80
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
86
81
  # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
87
82
  # @param [Hash] opts the optional parameters
88
83
  # @return [Environment]
89
84
  def get_environment(project_key, environment_key, opts = {})
90
85
  data, _status_code, _headers = get_environment_with_http_info(project_key, environment_key, opts)
91
- return data
86
+ data
92
87
  end
93
88
 
94
89
  # Get an environment given a project and key.
95
- #
96
90
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
97
91
  # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
98
92
  # @param [Hash] opts the optional parameters
99
93
  # @return [Array<(Environment, Fixnum, Hash)>] Environment data, response status code and response headers
100
94
  def get_environment_with_http_info(project_key, environment_key, opts = {})
101
95
  if @api_client.config.debugging
102
- @api_client.config.logger.debug "Calling API: EnvironmentsApi.get_environment ..."
96
+ @api_client.config.logger.debug 'Calling API: EnvironmentsApi.get_environment ...'
103
97
  end
104
98
  # verify the required parameter 'project_key' is set
105
99
  if @api_client.config.client_side_validation && project_key.nil?
@@ -110,7 +104,7 @@ module LaunchDarklyApi
110
104
  fail ArgumentError, "Missing the required parameter 'environment_key' when calling EnvironmentsApi.get_environment"
111
105
  end
112
106
  # resource path
113
- local_var_path = "/projects/{projectKey}/environments/{environmentKey}".sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)
107
+ local_var_path = '/projects/{projectKey}/environments/{environmentKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)
114
108
 
115
109
  # query parameters
116
110
  query_params = {}
@@ -140,9 +134,7 @@ module LaunchDarklyApi
140
134
  end
141
135
  return data, status_code, headers
142
136
  end
143
-
144
137
  # Modify an environment by ID.
145
- #
146
138
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
147
139
  # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
148
140
  # @param patch_delta Requires a JSON Patch representation of the desired changes to the project. &#39;http://jsonpatch.com/&#39;
@@ -150,11 +142,10 @@ module LaunchDarklyApi
150
142
  # @return [Environment]
151
143
  def patch_environment(project_key, environment_key, patch_delta, opts = {})
152
144
  data, _status_code, _headers = patch_environment_with_http_info(project_key, environment_key, patch_delta, opts)
153
- return data
145
+ data
154
146
  end
155
147
 
156
148
  # Modify an environment by ID.
157
- #
158
149
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
159
150
  # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
160
151
  # @param patch_delta Requires a JSON Patch representation of the desired changes to the project. &#39;http://jsonpatch.com/&#39;
@@ -162,7 +153,7 @@ module LaunchDarklyApi
162
153
  # @return [Array<(Environment, Fixnum, Hash)>] Environment data, response status code and response headers
163
154
  def patch_environment_with_http_info(project_key, environment_key, patch_delta, opts = {})
164
155
  if @api_client.config.debugging
165
- @api_client.config.logger.debug "Calling API: EnvironmentsApi.patch_environment ..."
156
+ @api_client.config.logger.debug 'Calling API: EnvironmentsApi.patch_environment ...'
166
157
  end
167
158
  # verify the required parameter 'project_key' is set
168
159
  if @api_client.config.client_side_validation && project_key.nil?
@@ -177,7 +168,7 @@ module LaunchDarklyApi
177
168
  fail ArgumentError, "Missing the required parameter 'patch_delta' when calling EnvironmentsApi.patch_environment"
178
169
  end
179
170
  # resource path
180
- local_var_path = "/projects/{projectKey}/environments/{environmentKey}".sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)
171
+ local_var_path = '/projects/{projectKey}/environments/{environmentKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)
181
172
 
182
173
  # query parameters
183
174
  query_params = {}
@@ -207,27 +198,24 @@ module LaunchDarklyApi
207
198
  end
208
199
  return data, status_code, headers
209
200
  end
210
-
211
201
  # Create a new environment in a specified project with a given name, key, and swatch color.
212
- #
213
202
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
214
203
  # @param environment_body New environment.
215
204
  # @param [Hash] opts the optional parameters
216
- # @return [nil]
205
+ # @return [Environment]
217
206
  def post_environment(project_key, environment_body, opts = {})
218
- post_environment_with_http_info(project_key, environment_body, opts)
219
- return nil
207
+ data, _status_code, _headers = post_environment_with_http_info(project_key, environment_body, opts)
208
+ data
220
209
  end
221
210
 
222
211
  # Create a new environment in a specified project with a given name, key, and swatch color.
223
- #
224
212
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
225
213
  # @param environment_body New environment.
226
214
  # @param [Hash] opts the optional parameters
227
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
215
+ # @return [Array<(Environment, Fixnum, Hash)>] Environment data, response status code and response headers
228
216
  def post_environment_with_http_info(project_key, environment_body, opts = {})
229
217
  if @api_client.config.debugging
230
- @api_client.config.logger.debug "Calling API: EnvironmentsApi.post_environment ..."
218
+ @api_client.config.logger.debug 'Calling API: EnvironmentsApi.post_environment ...'
231
219
  end
232
220
  # verify the required parameter 'project_key' is set
233
221
  if @api_client.config.client_side_validation && project_key.nil?
@@ -238,7 +226,7 @@ module LaunchDarklyApi
238
226
  fail ArgumentError, "Missing the required parameter 'environment_body' when calling EnvironmentsApi.post_environment"
239
227
  end
240
228
  # resource path
241
- local_var_path = "/projects/{projectKey}/environments".sub('{' + 'projectKey' + '}', project_key.to_s)
229
+ local_var_path = '/projects/{projectKey}/environments'.sub('{' + 'projectKey' + '}', project_key.to_s)
242
230
 
243
231
  # query parameters
244
232
  query_params = {}
@@ -261,7 +249,8 @@ module LaunchDarklyApi
261
249
  :query_params => query_params,
262
250
  :form_params => form_params,
263
251
  :body => post_body,
264
- :auth_names => auth_names)
252
+ :auth_names => auth_names,
253
+ :return_type => 'Environment')
265
254
  if @api_client.config.debugging
266
255
  @api_client.config.logger.debug "API called: EnvironmentsApi#post_environment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
267
256
  end