solifyn 1.1.4 → 1.1.6

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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -4
  3. data/docs/CreateEntitlementDto.md +42 -0
  4. data/docs/CreateFramerTemplateDto.md +22 -0
  5. data/docs/EntitlementDetailResponseDto.md +56 -0
  6. data/docs/EntitlementGrantResponseDto.md +4 -0
  7. data/docs/EntitlementGrantsApi.md +5 -1
  8. data/docs/EntitlementsApi.md +331 -0
  9. data/docs/FramerIntegrationApi.md +355 -0
  10. data/docs/FramerTemplateResponseDto.md +30 -0
  11. data/docs/LinkedProductDto.md +20 -0
  12. data/docs/ProductCreate.md +7 -1
  13. data/docs/ProductUpdate.md +7 -1
  14. data/docs/UpdateEntitlementDto.md +42 -0
  15. data/docs/UpdateFramerTemplateDto.md +22 -0
  16. data/lib/solifyn/api/entitlement_grants_api.rb +6 -0
  17. data/lib/solifyn/api/entitlements_api.rb +347 -0
  18. data/lib/solifyn/api/framer_integration_api.rb +345 -0
  19. data/lib/solifyn/models/create_entitlement_dto.rb +385 -0
  20. data/lib/solifyn/models/create_framer_template_dto.rb +249 -0
  21. data/lib/solifyn/models/entitlement_detail_response_dto.rb +470 -0
  22. data/lib/solifyn/models/entitlement_grant_response_dto.rb +21 -1
  23. data/lib/solifyn/models/framer_template_response_dto.rb +317 -0
  24. data/lib/solifyn/models/linked_product_dto.rb +239 -0
  25. data/lib/solifyn/models/product_create.rb +38 -4
  26. data/lib/solifyn/models/product_update.rb +38 -4
  27. data/lib/solifyn/models/update_entitlement_dto.rb +371 -0
  28. data/lib/solifyn/models/update_framer_template_dto.rb +235 -0
  29. data/lib/solifyn/version.rb +1 -1
  30. data/lib/solifyn.rb +9 -0
  31. data/spec/api/entitlements_api_spec.rb +95 -0
  32. data/spec/api/framer_integration_api_spec.rb +95 -0
  33. data/spec/models/create_entitlement_dto_spec.rb +112 -0
  34. data/spec/models/create_framer_template_dto_spec.rb +48 -0
  35. data/spec/models/entitlement_detail_response_dto_spec.rb +150 -0
  36. data/spec/models/framer_template_response_dto_spec.rb +72 -0
  37. data/spec/models/linked_product_dto_spec.rb +42 -0
  38. data/spec/models/update_entitlement_dto_spec.rb +112 -0
  39. data/spec/models/update_framer_template_dto_spec.rb +48 -0
  40. metadata +172 -136
@@ -0,0 +1,347 @@
1
+ =begin
2
+ #Solifyn API
3
+
4
+ #Welcome to the Solifyn API Reference. Leverage our secure endpoints to manage products and issue, validate, and manage software license keys programmatically.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Solifyn
16
+ class EntitlementsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Entitlement
23
+ # Create a new independent access entitlement.
24
+ # @param create_entitlement_dto [CreateEntitlementDto]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [EntitlementDetailResponseDto]
27
+ def entitlements_create(create_entitlement_dto, opts = {})
28
+ data, _status_code, _headers = entitlements_create_with_http_info(create_entitlement_dto, opts)
29
+ data
30
+ end
31
+
32
+ # Create Entitlement
33
+ # Create a new independent access entitlement.
34
+ # @param create_entitlement_dto [CreateEntitlementDto]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(EntitlementDetailResponseDto, Integer, Hash)>] EntitlementDetailResponseDto data, response status code and response headers
37
+ def entitlements_create_with_http_info(create_entitlement_dto, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: EntitlementsApi.entitlements_create ...'
40
+ end
41
+ # verify the required parameter 'create_entitlement_dto' is set
42
+ if @api_client.config.client_side_validation && create_entitlement_dto.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_entitlement_dto' when calling EntitlementsApi.entitlements_create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/v1/entitlements'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_entitlement_dto)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'EntitlementDetailResponseDto'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || []
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"EntitlementsApi.entitlements_create",
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
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: EntitlementsApi#entitlements_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Delete Entitlement
91
+ # Delete an independent entitlement and unlink all mapped products.
92
+ # @param id [String] The unique entitlement ID.
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [EntitlementDetailResponseDto]
95
+ def entitlements_delete(id, opts = {})
96
+ data, _status_code, _headers = entitlements_delete_with_http_info(id, opts)
97
+ data
98
+ end
99
+
100
+ # Delete Entitlement
101
+ # Delete an independent entitlement and unlink all mapped products.
102
+ # @param id [String] The unique entitlement ID.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(EntitlementDetailResponseDto, Integer, Hash)>] EntitlementDetailResponseDto data, response status code and response headers
105
+ def entitlements_delete_with_http_info(id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: EntitlementsApi.entitlements_delete ...'
108
+ end
109
+ # verify the required parameter 'id' is set
110
+ if @api_client.config.client_side_validation && id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'id' when calling EntitlementsApi.entitlements_delete"
112
+ end
113
+ # resource path
114
+ local_var_path = '/v1/entitlements/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:debug_body]
129
+
130
+ # return_type
131
+ return_type = opts[:debug_return_type] || 'EntitlementDetailResponseDto'
132
+
133
+ # auth_names
134
+ auth_names = opts[:debug_auth_names] || []
135
+
136
+ new_options = opts.merge(
137
+ :operation => :"EntitlementsApi.entitlements_delete",
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 => return_type
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: EntitlementsApi#entitlements_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+
153
+ # Retrieve Entitlement
154
+ # Retrieve a specific entitlement definition by ID.
155
+ # @param id [String] The unique entitlement ID.
156
+ # @param [Hash] opts the optional parameters
157
+ # @return [EntitlementDetailResponseDto]
158
+ def entitlements_get(id, opts = {})
159
+ data, _status_code, _headers = entitlements_get_with_http_info(id, opts)
160
+ data
161
+ end
162
+
163
+ # Retrieve Entitlement
164
+ # Retrieve a specific entitlement definition by ID.
165
+ # @param id [String] The unique entitlement ID.
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [Array<(EntitlementDetailResponseDto, Integer, Hash)>] EntitlementDetailResponseDto data, response status code and response headers
168
+ def entitlements_get_with_http_info(id, opts = {})
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug 'Calling API: EntitlementsApi.entitlements_get ...'
171
+ end
172
+ # verify the required parameter 'id' is set
173
+ if @api_client.config.client_side_validation && id.nil?
174
+ fail ArgumentError, "Missing the required parameter 'id' when calling EntitlementsApi.entitlements_get"
175
+ end
176
+ # resource path
177
+ local_var_path = '/v1/entitlements/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
178
+
179
+ # query parameters
180
+ query_params = opts[:query_params] || {}
181
+
182
+ # header parameters
183
+ header_params = opts[:header_params] || {}
184
+ # HTTP header 'Accept' (if needed)
185
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
186
+
187
+ # form parameters
188
+ form_params = opts[:form_params] || {}
189
+
190
+ # http body (model)
191
+ post_body = opts[:debug_body]
192
+
193
+ # return_type
194
+ return_type = opts[:debug_return_type] || 'EntitlementDetailResponseDto'
195
+
196
+ # auth_names
197
+ auth_names = opts[:debug_auth_names] || []
198
+
199
+ new_options = opts.merge(
200
+ :operation => :"EntitlementsApi.entitlements_get",
201
+ :header_params => header_params,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body,
205
+ :auth_names => auth_names,
206
+ :return_type => return_type
207
+ )
208
+
209
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug "API called: EntitlementsApi#entitlements_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
212
+ end
213
+ return data, status_code, headers
214
+ end
215
+
216
+ # List Entitlements
217
+ # List all independent entitlements for the active business.
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [Array<EntitlementDetailResponseDto>]
220
+ def entitlements_list(opts = {})
221
+ data, _status_code, _headers = entitlements_list_with_http_info(opts)
222
+ data
223
+ end
224
+
225
+ # List Entitlements
226
+ # List all independent entitlements for the active business.
227
+ # @param [Hash] opts the optional parameters
228
+ # @return [Array<(Array<EntitlementDetailResponseDto>, Integer, Hash)>] Array<EntitlementDetailResponseDto> data, response status code and response headers
229
+ def entitlements_list_with_http_info(opts = {})
230
+ if @api_client.config.debugging
231
+ @api_client.config.logger.debug 'Calling API: EntitlementsApi.entitlements_list ...'
232
+ end
233
+ # resource path
234
+ local_var_path = '/v1/entitlements'
235
+
236
+ # query parameters
237
+ query_params = opts[:query_params] || {}
238
+
239
+ # header parameters
240
+ header_params = opts[:header_params] || {}
241
+ # HTTP header 'Accept' (if needed)
242
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
243
+
244
+ # form parameters
245
+ form_params = opts[:form_params] || {}
246
+
247
+ # http body (model)
248
+ post_body = opts[:debug_body]
249
+
250
+ # return_type
251
+ return_type = opts[:debug_return_type] || 'Array<EntitlementDetailResponseDto>'
252
+
253
+ # auth_names
254
+ auth_names = opts[:debug_auth_names] || []
255
+
256
+ new_options = opts.merge(
257
+ :operation => :"EntitlementsApi.entitlements_list",
258
+ :header_params => header_params,
259
+ :query_params => query_params,
260
+ :form_params => form_params,
261
+ :body => post_body,
262
+ :auth_names => auth_names,
263
+ :return_type => return_type
264
+ )
265
+
266
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
267
+ if @api_client.config.debugging
268
+ @api_client.config.logger.debug "API called: EntitlementsApi#entitlements_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
269
+ end
270
+ return data, status_code, headers
271
+ end
272
+
273
+ # Update Entitlement
274
+ # Update details of an existing independent entitlement.
275
+ # @param id [String] The unique entitlement ID.
276
+ # @param update_entitlement_dto [UpdateEntitlementDto]
277
+ # @param [Hash] opts the optional parameters
278
+ # @return [EntitlementDetailResponseDto]
279
+ def entitlements_update(id, update_entitlement_dto, opts = {})
280
+ data, _status_code, _headers = entitlements_update_with_http_info(id, update_entitlement_dto, opts)
281
+ data
282
+ end
283
+
284
+ # Update Entitlement
285
+ # Update details of an existing independent entitlement.
286
+ # @param id [String] The unique entitlement ID.
287
+ # @param update_entitlement_dto [UpdateEntitlementDto]
288
+ # @param [Hash] opts the optional parameters
289
+ # @return [Array<(EntitlementDetailResponseDto, Integer, Hash)>] EntitlementDetailResponseDto data, response status code and response headers
290
+ def entitlements_update_with_http_info(id, update_entitlement_dto, opts = {})
291
+ if @api_client.config.debugging
292
+ @api_client.config.logger.debug 'Calling API: EntitlementsApi.entitlements_update ...'
293
+ end
294
+ # verify the required parameter 'id' is set
295
+ if @api_client.config.client_side_validation && id.nil?
296
+ fail ArgumentError, "Missing the required parameter 'id' when calling EntitlementsApi.entitlements_update"
297
+ end
298
+ # verify the required parameter 'update_entitlement_dto' is set
299
+ if @api_client.config.client_side_validation && update_entitlement_dto.nil?
300
+ fail ArgumentError, "Missing the required parameter 'update_entitlement_dto' when calling EntitlementsApi.entitlements_update"
301
+ end
302
+ # resource path
303
+ local_var_path = '/v1/entitlements/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
304
+
305
+ # query parameters
306
+ query_params = opts[:query_params] || {}
307
+
308
+ # header parameters
309
+ header_params = opts[:header_params] || {}
310
+ # HTTP header 'Accept' (if needed)
311
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
312
+ # HTTP header 'Content-Type'
313
+ content_type = @api_client.select_header_content_type(['application/json'])
314
+ if !content_type.nil?
315
+ header_params['Content-Type'] = content_type
316
+ end
317
+
318
+ # form parameters
319
+ form_params = opts[:form_params] || {}
320
+
321
+ # http body (model)
322
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_entitlement_dto)
323
+
324
+ # return_type
325
+ return_type = opts[:debug_return_type] || 'EntitlementDetailResponseDto'
326
+
327
+ # auth_names
328
+ auth_names = opts[:debug_auth_names] || []
329
+
330
+ new_options = opts.merge(
331
+ :operation => :"EntitlementsApi.entitlements_update",
332
+ :header_params => header_params,
333
+ :query_params => query_params,
334
+ :form_params => form_params,
335
+ :body => post_body,
336
+ :auth_names => auth_names,
337
+ :return_type => return_type
338
+ )
339
+
340
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
341
+ if @api_client.config.debugging
342
+ @api_client.config.logger.debug "API called: EntitlementsApi#entitlements_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
343
+ end
344
+ return data, status_code, headers
345
+ end
346
+ end
347
+ end
@@ -0,0 +1,345 @@
1
+ =begin
2
+ #Solifyn API
3
+
4
+ #Welcome to the Solifyn API Reference. Leverage our secure endpoints to manage products and issue, validate, and manage software license keys programmatically.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Solifyn
16
+ class FramerIntegrationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Framer Template
23
+ # Registers a new Framer template with its public remix link for the active business.
24
+ # @param create_framer_template_dto [CreateFramerTemplateDto]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [FramerTemplateResponseDto]
27
+ def framer_create_template(create_framer_template_dto, opts = {})
28
+ data, _status_code, _headers = framer_create_template_with_http_info(create_framer_template_dto, opts)
29
+ data
30
+ end
31
+
32
+ # Create Framer Template
33
+ # Registers a new Framer template with its public remix link for the active business.
34
+ # @param create_framer_template_dto [CreateFramerTemplateDto]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(FramerTemplateResponseDto, Integer, Hash)>] FramerTemplateResponseDto data, response status code and response headers
37
+ def framer_create_template_with_http_info(create_framer_template_dto, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: FramerIntegrationApi.framer_create_template ...'
40
+ end
41
+ # verify the required parameter 'create_framer_template_dto' is set
42
+ if @api_client.config.client_side_validation && create_framer_template_dto.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_framer_template_dto' when calling FramerIntegrationApi.framer_create_template"
44
+ end
45
+ # resource path
46
+ local_var_path = '/v1/framer/templates'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_framer_template_dto)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'FramerTemplateResponseDto'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"FramerIntegrationApi.framer_create_template",
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
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: FramerIntegrationApi#framer_create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Delete Framer Template
91
+ # Deletes a registered Framer template for the active business.
92
+ # @param id [String] The Framer template ID
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [nil]
95
+ def framer_delete_template(id, opts = {})
96
+ framer_delete_template_with_http_info(id, opts)
97
+ nil
98
+ end
99
+
100
+ # Delete Framer Template
101
+ # Deletes a registered Framer template for the active business.
102
+ # @param id [String] The Framer template ID
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
105
+ def framer_delete_template_with_http_info(id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: FramerIntegrationApi.framer_delete_template ...'
108
+ end
109
+ # verify the required parameter 'id' is set
110
+ if @api_client.config.client_side_validation && id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'id' when calling FramerIntegrationApi.framer_delete_template"
112
+ end
113
+ # resource path
114
+ local_var_path = '/v1/framer/templates/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+
122
+ # form parameters
123
+ form_params = opts[:form_params] || {}
124
+
125
+ # http body (model)
126
+ post_body = opts[:debug_body]
127
+
128
+ # return_type
129
+ return_type = opts[:debug_return_type]
130
+
131
+ # auth_names
132
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
133
+
134
+ new_options = opts.merge(
135
+ :operation => :"FramerIntegrationApi.framer_delete_template",
136
+ :header_params => header_params,
137
+ :query_params => query_params,
138
+ :form_params => form_params,
139
+ :body => post_body,
140
+ :auth_names => auth_names,
141
+ :return_type => return_type
142
+ )
143
+
144
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: FramerIntegrationApi#framer_delete_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
147
+ end
148
+ return data, status_code, headers
149
+ end
150
+
151
+ # Retrieve Framer Template
152
+ # Retrieves details of a specific registered Framer template.
153
+ # @param id [String] The Framer template ID
154
+ # @param [Hash] opts the optional parameters
155
+ # @return [FramerTemplateResponseDto]
156
+ def framer_get_template(id, opts = {})
157
+ data, _status_code, _headers = framer_get_template_with_http_info(id, opts)
158
+ data
159
+ end
160
+
161
+ # Retrieve Framer Template
162
+ # Retrieves details of a specific registered Framer template.
163
+ # @param id [String] The Framer template ID
164
+ # @param [Hash] opts the optional parameters
165
+ # @return [Array<(FramerTemplateResponseDto, Integer, Hash)>] FramerTemplateResponseDto data, response status code and response headers
166
+ def framer_get_template_with_http_info(id, opts = {})
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug 'Calling API: FramerIntegrationApi.framer_get_template ...'
169
+ end
170
+ # verify the required parameter 'id' is set
171
+ if @api_client.config.client_side_validation && id.nil?
172
+ fail ArgumentError, "Missing the required parameter 'id' when calling FramerIntegrationApi.framer_get_template"
173
+ end
174
+ # resource path
175
+ local_var_path = '/v1/framer/templates/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
176
+
177
+ # query parameters
178
+ query_params = opts[:query_params] || {}
179
+
180
+ # header parameters
181
+ header_params = opts[:header_params] || {}
182
+ # HTTP header 'Accept' (if needed)
183
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
184
+
185
+ # form parameters
186
+ form_params = opts[:form_params] || {}
187
+
188
+ # http body (model)
189
+ post_body = opts[:debug_body]
190
+
191
+ # return_type
192
+ return_type = opts[:debug_return_type] || 'FramerTemplateResponseDto'
193
+
194
+ # auth_names
195
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
196
+
197
+ new_options = opts.merge(
198
+ :operation => :"FramerIntegrationApi.framer_get_template",
199
+ :header_params => header_params,
200
+ :query_params => query_params,
201
+ :form_params => form_params,
202
+ :body => post_body,
203
+ :auth_names => auth_names,
204
+ :return_type => return_type
205
+ )
206
+
207
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
208
+ if @api_client.config.debugging
209
+ @api_client.config.logger.debug "API called: FramerIntegrationApi#framer_get_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
+ end
211
+ return data, status_code, headers
212
+ end
213
+
214
+ # List Framer Templates
215
+ # Retrieves all registered Framer templates for the active business.
216
+ # @param [Hash] opts the optional parameters
217
+ # @return [Array<FramerTemplateResponseDto>]
218
+ def framer_list_templates(opts = {})
219
+ data, _status_code, _headers = framer_list_templates_with_http_info(opts)
220
+ data
221
+ end
222
+
223
+ # List Framer Templates
224
+ # Retrieves all registered Framer templates for the active business.
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [Array<(Array<FramerTemplateResponseDto>, Integer, Hash)>] Array<FramerTemplateResponseDto> data, response status code and response headers
227
+ def framer_list_templates_with_http_info(opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug 'Calling API: FramerIntegrationApi.framer_list_templates ...'
230
+ end
231
+ # resource path
232
+ local_var_path = '/v1/framer/templates'
233
+
234
+ # query parameters
235
+ query_params = opts[:query_params] || {}
236
+
237
+ # header parameters
238
+ header_params = opts[:header_params] || {}
239
+ # HTTP header 'Accept' (if needed)
240
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
241
+
242
+ # form parameters
243
+ form_params = opts[:form_params] || {}
244
+
245
+ # http body (model)
246
+ post_body = opts[:debug_body]
247
+
248
+ # return_type
249
+ return_type = opts[:debug_return_type] || 'Array<FramerTemplateResponseDto>'
250
+
251
+ # auth_names
252
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
253
+
254
+ new_options = opts.merge(
255
+ :operation => :"FramerIntegrationApi.framer_list_templates",
256
+ :header_params => header_params,
257
+ :query_params => query_params,
258
+ :form_params => form_params,
259
+ :body => post_body,
260
+ :auth_names => auth_names,
261
+ :return_type => return_type
262
+ )
263
+
264
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug "API called: FramerIntegrationApi#framer_list_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
267
+ end
268
+ return data, status_code, headers
269
+ end
270
+
271
+ # Update Framer Template
272
+ # Updates a registered Framer template for the active business.
273
+ # @param id [String] The Framer template ID
274
+ # @param update_framer_template_dto [UpdateFramerTemplateDto]
275
+ # @param [Hash] opts the optional parameters
276
+ # @return [FramerTemplateResponseDto]
277
+ def framer_update_template(id, update_framer_template_dto, opts = {})
278
+ data, _status_code, _headers = framer_update_template_with_http_info(id, update_framer_template_dto, opts)
279
+ data
280
+ end
281
+
282
+ # Update Framer Template
283
+ # Updates a registered Framer template for the active business.
284
+ # @param id [String] The Framer template ID
285
+ # @param update_framer_template_dto [UpdateFramerTemplateDto]
286
+ # @param [Hash] opts the optional parameters
287
+ # @return [Array<(FramerTemplateResponseDto, Integer, Hash)>] FramerTemplateResponseDto data, response status code and response headers
288
+ def framer_update_template_with_http_info(id, update_framer_template_dto, opts = {})
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug 'Calling API: FramerIntegrationApi.framer_update_template ...'
291
+ end
292
+ # verify the required parameter 'id' is set
293
+ if @api_client.config.client_side_validation && id.nil?
294
+ fail ArgumentError, "Missing the required parameter 'id' when calling FramerIntegrationApi.framer_update_template"
295
+ end
296
+ # verify the required parameter 'update_framer_template_dto' is set
297
+ if @api_client.config.client_side_validation && update_framer_template_dto.nil?
298
+ fail ArgumentError, "Missing the required parameter 'update_framer_template_dto' when calling FramerIntegrationApi.framer_update_template"
299
+ end
300
+ # resource path
301
+ local_var_path = '/v1/framer/templates/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
302
+
303
+ # query parameters
304
+ query_params = opts[:query_params] || {}
305
+
306
+ # header parameters
307
+ header_params = opts[:header_params] || {}
308
+ # HTTP header 'Accept' (if needed)
309
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
310
+ # HTTP header 'Content-Type'
311
+ content_type = @api_client.select_header_content_type(['application/json'])
312
+ if !content_type.nil?
313
+ header_params['Content-Type'] = content_type
314
+ end
315
+
316
+ # form parameters
317
+ form_params = opts[:form_params] || {}
318
+
319
+ # http body (model)
320
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_framer_template_dto)
321
+
322
+ # return_type
323
+ return_type = opts[:debug_return_type] || 'FramerTemplateResponseDto'
324
+
325
+ # auth_names
326
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
327
+
328
+ new_options = opts.merge(
329
+ :operation => :"FramerIntegrationApi.framer_update_template",
330
+ :header_params => header_params,
331
+ :query_params => query_params,
332
+ :form_params => form_params,
333
+ :body => post_body,
334
+ :auth_names => auth_names,
335
+ :return_type => return_type
336
+ )
337
+
338
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
339
+ if @api_client.config.debugging
340
+ @api_client.config.logger.debug "API called: FramerIntegrationApi#framer_update_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
341
+ end
342
+ return data, status_code, headers
343
+ end
344
+ end
345
+ end