ilovevideoeditor-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/generated/ilovevideoeditor-sdk/api/api_keys_api.rb +204 -0
- data/lib/generated/ilovevideoeditor-sdk/api/assets_api.rb +632 -0
- data/lib/generated/ilovevideoeditor-sdk/api/billing_api.rb +428 -0
- data/lib/generated/ilovevideoeditor-sdk/api/health_api.rb +134 -0
- data/lib/generated/ilovevideoeditor-sdk/api/integrations_api.rb +587 -0
- data/lib/generated/ilovevideoeditor-sdk/api/projects_api.rb +614 -0
- data/lib/generated/ilovevideoeditor-sdk/api/render_api.rb +656 -0
- data/lib/generated/ilovevideoeditor-sdk/api/renditions_api.rb +420 -0
- data/lib/generated/ilovevideoeditor-sdk/api/templates_api.rb +217 -0
- data/lib/generated/ilovevideoeditor-sdk/api/tools_api.rb +220 -0
- data/lib/generated/ilovevideoeditor-sdk/api/webhooks_api.rb +204 -0
- data/lib/generated/ilovevideoeditor-sdk/api/workflows_api.rb +854 -0
- data/lib/generated/ilovevideoeditor-sdk/api_client.rb +397 -0
- data/lib/generated/ilovevideoeditor-sdk/api_error.rb +58 -0
- data/lib/generated/ilovevideoeditor-sdk/api_model_base.rb +88 -0
- data/lib/generated/ilovevideoeditor-sdk/configuration.rb +316 -0
- data/lib/generated/ilovevideoeditor-sdk/models/api_key.rb +246 -0
- data/lib/generated/ilovevideoeditor-sdk/models/api_key_with_secret.rb +191 -0
- data/lib/generated/ilovevideoeditor-sdk/models/asset.rb +404 -0
- data/lib/generated/ilovevideoeditor-sdk/models/asset_create.rb +303 -0
- data/lib/generated/ilovevideoeditor-sdk/models/asset_upload_url_response.rb +295 -0
- data/lib/generated/ilovevideoeditor-sdk/models/batch_delete_projects_request.rb +184 -0
- data/lib/generated/ilovevideoeditor-sdk/models/batch_delete_result.rb +175 -0
- data/lib/generated/ilovevideoeditor-sdk/models/billing_prices.rb +158 -0
- data/lib/generated/ilovevideoeditor-sdk/models/billing_prices_tiers.rb +168 -0
- data/lib/generated/ilovevideoeditor-sdk/models/billing_subscription.rb +254 -0
- data/lib/generated/ilovevideoeditor-sdk/models/cancel_render200_response.rb +225 -0
- data/lib/generated/ilovevideoeditor-sdk/models/create_api_key_request.rb +147 -0
- data/lib/generated/ilovevideoeditor-sdk/models/create_asset201_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/create_checkout_session200_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/create_checkout_session_request.rb +220 -0
- data/lib/generated/ilovevideoeditor-sdk/models/create_integration201_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/create_project200_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/create_workflow201_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/create_workflow_request.rb +208 -0
- data/lib/generated/ilovevideoeditor-sdk/models/credit_balance.rb +219 -0
- data/lib/generated/ilovevideoeditor-sdk/models/credit_balance_summary.rb +174 -0
- data/lib/generated/ilovevideoeditor-sdk/models/credit_balance_usage.rb +156 -0
- data/lib/generated/ilovevideoeditor-sdk/models/delete_project200_response.rb +190 -0
- data/lib/generated/ilovevideoeditor-sdk/models/destination.rb +331 -0
- data/lib/generated/ilovevideoeditor-sdk/models/destination_input.rb +304 -0
- data/lib/generated/ilovevideoeditor-sdk/models/error.rb +182 -0
- data/lib/generated/ilovevideoeditor-sdk/models/estimate_render_cost_request.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_asset_signed_url200_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_asset_upload_url_request.rb +214 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_destination200_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_project200_response.rb +173 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_project_stats200_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_render_download_url200_response.rb +190 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_rendition200_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_subscription200_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_template200_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_usage200_response.rb +166 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_workflow200_response.rb +175 -0
- data/lib/generated/ilovevideoeditor-sdk/models/get_workflow_run200_response.rb +175 -0
- data/lib/generated/ilovevideoeditor-sdk/models/health_check200_response.rb +147 -0
- data/lib/generated/ilovevideoeditor-sdk/models/health_check_detailed200_response.rb +199 -0
- data/lib/generated/ilovevideoeditor-sdk/models/health_check_detailed200_response_services.rb +156 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_api_keys200_response.rb +166 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_assets200_response.rb +185 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_integrations200_response.rb +166 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_invoices200_response.rb +158 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_projects200_response.rb +185 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_renditions200_response.rb +185 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_templates200_response.rb +166 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_webhook_subscriptions200_response.rb +166 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_workflow_runs200_response.rb +185 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_workflow_step_types200_response.rb +166 -0
- data/lib/generated/ilovevideoeditor-sdk/models/list_workflows200_response.rb +185 -0
- data/lib/generated/ilovevideoeditor-sdk/models/project.rb +329 -0
- data/lib/generated/ilovevideoeditor-sdk/models/project_create.rb +218 -0
- data/lib/generated/ilovevideoeditor-sdk/models/project_update.rb +239 -0
- data/lib/generated/ilovevideoeditor-sdk/models/queue_render200_response.rb +199 -0
- data/lib/generated/ilovevideoeditor-sdk/models/queue_render_request.rb +182 -0
- data/lib/generated/ilovevideoeditor-sdk/models/refresh_render_url200_response.rb +190 -0
- data/lib/generated/ilovevideoeditor-sdk/models/render_cost_estimate.rb +254 -0
- data/lib/generated/ilovevideoeditor-sdk/models/render_cost_estimate_resolution.rb +165 -0
- data/lib/generated/ilovevideoeditor-sdk/models/render_cost_estimate_tier.rb +165 -0
- data/lib/generated/ilovevideoeditor-sdk/models/render_job.rb +271 -0
- data/lib/generated/ilovevideoeditor-sdk/models/render_job_progress.rb +165 -0
- data/lib/generated/ilovevideoeditor-sdk/models/render_list_item.rb +356 -0
- data/lib/generated/ilovevideoeditor-sdk/models/render_template_request.rb +167 -0
- data/lib/generated/ilovevideoeditor-sdk/models/render_webhook_payload.rb +357 -0
- data/lib/generated/ilovevideoeditor-sdk/models/rendition.rb +335 -0
- data/lib/generated/ilovevideoeditor-sdk/models/rendition_cancel_result.rb +236 -0
- data/lib/generated/ilovevideoeditor-sdk/models/rendition_output.rb +233 -0
- data/lib/generated/ilovevideoeditor-sdk/models/rendition_stats.rb +192 -0
- data/lib/generated/ilovevideoeditor-sdk/models/run_workflow202_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/run_workflow_request.rb +149 -0
- data/lib/generated/ilovevideoeditor-sdk/models/service_health.rb +208 -0
- data/lib/generated/ilovevideoeditor-sdk/models/template.rb +324 -0
- data/lib/generated/ilovevideoeditor-sdk/models/template_summary.rb +322 -0
- data/lib/generated/ilovevideoeditor-sdk/models/test_integration200_response.rb +174 -0
- data/lib/generated/ilovevideoeditor-sdk/models/tier_info.rb +214 -0
- data/lib/generated/ilovevideoeditor-sdk/models/tier_info_credits.rb +165 -0
- data/lib/generated/ilovevideoeditor-sdk/models/tool_job_request.rb +242 -0
- data/lib/generated/ilovevideoeditor-sdk/models/tool_job_request_dimensions.rb +208 -0
- data/lib/generated/ilovevideoeditor-sdk/models/tool_job_status.rb +310 -0
- data/lib/generated/ilovevideoeditor-sdk/models/track_render_bandwidth200_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/update_workflow_request.rb +174 -0
- data/lib/generated/ilovevideoeditor-sdk/models/upload_asset200_response.rb +164 -0
- data/lib/generated/ilovevideoeditor-sdk/models/usage_log.rb +302 -0
- data/lib/generated/ilovevideoeditor-sdk/models/video_json.rb +243 -0
- data/lib/generated/ilovevideoeditor-sdk/models/video_json_destination.rb +227 -0
- data/lib/generated/ilovevideoeditor-sdk/models/webhook_subscription.rb +283 -0
- data/lib/generated/ilovevideoeditor-sdk/models/webhook_subscription_create.rb +204 -0
- data/lib/generated/ilovevideoeditor-sdk/models/workflow.rb +356 -0
- data/lib/generated/ilovevideoeditor-sdk/models/workflow_definition.rb +262 -0
- data/lib/generated/ilovevideoeditor-sdk/models/workflow_run.rb +372 -0
- data/lib/generated/ilovevideoeditor-sdk/models/workflow_run_step.rb +409 -0
- data/lib/generated/ilovevideoeditor-sdk/models/workflow_step.rb +262 -0
- data/lib/generated/ilovevideoeditor-sdk/models/workflow_variable.rb +242 -0
- data/lib/generated/ilovevideoeditor-sdk/models/workspace_integration.rb +398 -0
- data/lib/generated/ilovevideoeditor-sdk/models/workspace_integration_input.rb +260 -0
- data/lib/generated/ilovevideoeditor-sdk/version.rb +15 -0
- data/lib/generated/ilovevideoeditor-sdk.rb +150 -0
- data/lib/ilovevideoeditor/client.rb +106 -0
- data/lib/ilovevideoeditor-sdk.rb +2 -0
- metadata +181 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#iLoveVideoEditor API
|
|
3
|
+
|
|
4
|
+
#Cloud video rendering API for iLoveVideoEditor. Submit a `VideoJSON` payload, queue a render job, and download the resulting MP4. **Authentication** - **API Key** (`x-api-key` header) — accepted by render pipeline and tool endpoints. - **Bearer Token** (`Authorization: Bearer <jwt>`) — required for user-scoped project, asset, billing, and webhook endpoints. - Many endpoints accept either form of authentication. **SDKs** Official typed SDKs are available for JavaScript/TypeScript, PHP, Python, Ruby, and Go. See https://ilovevideoeditor.com/docs/sdks **Outbound Webhooks** Render lifecycle events (`render.completed`, `render.failed`) are delivered to your endpoints as signed HTTP POST requests. See the `Webhooks` tag and the root-level `x-webhook-docs` extension for the payload format (`RenderWebhookPayload`), signature headers, HMAC verification, and the retry policy.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ILoveVideoEditor
|
|
17
|
+
class CreateAsset201Response < ApiModelBase
|
|
18
|
+
attr_accessor :asset
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'asset' => :'asset'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'asset' => :'Asset'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ILoveVideoEditor::CreateAsset201Response` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ILoveVideoEditor::CreateAsset201Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'asset')
|
|
67
|
+
self.asset = attributes[:'asset']
|
|
68
|
+
else
|
|
69
|
+
self.asset = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @asset.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "asset", asset cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
+
return false if @asset.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] asset Value to be assigned
|
|
95
|
+
def asset=(asset)
|
|
96
|
+
if asset.nil?
|
|
97
|
+
fail ArgumentError, 'asset cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@asset = asset
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
asset == o.asset
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[asset].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
transformed_hash = {}
|
|
130
|
+
openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = nil
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
new(transformed_hash)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Returns the object in the form of hash
|
|
147
|
+
# @return [Hash] Returns the object in the form of hash
|
|
148
|
+
def to_hash
|
|
149
|
+
hash = {}
|
|
150
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
151
|
+
value = self.send(attr)
|
|
152
|
+
if value.nil?
|
|
153
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
154
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#iLoveVideoEditor API
|
|
3
|
+
|
|
4
|
+
#Cloud video rendering API for iLoveVideoEditor. Submit a `VideoJSON` payload, queue a render job, and download the resulting MP4. **Authentication** - **API Key** (`x-api-key` header) — accepted by render pipeline and tool endpoints. - **Bearer Token** (`Authorization: Bearer <jwt>`) — required for user-scoped project, asset, billing, and webhook endpoints. - Many endpoints accept either form of authentication. **SDKs** Official typed SDKs are available for JavaScript/TypeScript, PHP, Python, Ruby, and Go. See https://ilovevideoeditor.com/docs/sdks **Outbound Webhooks** Render lifecycle events (`render.completed`, `render.failed`) are delivered to your endpoints as signed HTTP POST requests. See the `Webhooks` tag and the root-level `x-webhook-docs` extension for the payload format (`RenderWebhookPayload`), signature headers, HMAC verification, and the retry policy.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ILoveVideoEditor
|
|
17
|
+
class CreateCheckoutSession200Response < ApiModelBase
|
|
18
|
+
attr_accessor :url
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'url' => :'url'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'url' => :'String'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ILoveVideoEditor::CreateCheckoutSession200Response` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ILoveVideoEditor::CreateCheckoutSession200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'url')
|
|
67
|
+
self.url = attributes[:'url']
|
|
68
|
+
else
|
|
69
|
+
self.url = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @url.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
+
return false if @url.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] url Value to be assigned
|
|
95
|
+
def url=(url)
|
|
96
|
+
if url.nil?
|
|
97
|
+
fail ArgumentError, 'url cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@url = url
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
url == o.url
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[url].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
transformed_hash = {}
|
|
130
|
+
openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = nil
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
new(transformed_hash)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Returns the object in the form of hash
|
|
147
|
+
# @return [Hash] Returns the object in the form of hash
|
|
148
|
+
def to_hash
|
|
149
|
+
hash = {}
|
|
150
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
151
|
+
value = self.send(attr)
|
|
152
|
+
if value.nil?
|
|
153
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
154
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#iLoveVideoEditor API
|
|
3
|
+
|
|
4
|
+
#Cloud video rendering API for iLoveVideoEditor. Submit a `VideoJSON` payload, queue a render job, and download the resulting MP4. **Authentication** - **API Key** (`x-api-key` header) — accepted by render pipeline and tool endpoints. - **Bearer Token** (`Authorization: Bearer <jwt>`) — required for user-scoped project, asset, billing, and webhook endpoints. - Many endpoints accept either form of authentication. **SDKs** Official typed SDKs are available for JavaScript/TypeScript, PHP, Python, Ruby, and Go. See https://ilovevideoeditor.com/docs/sdks **Outbound Webhooks** Render lifecycle events (`render.completed`, `render.failed`) are delivered to your endpoints as signed HTTP POST requests. See the `Webhooks` tag and the root-level `x-webhook-docs` extension for the payload format (`RenderWebhookPayload`), signature headers, HMAC verification, and the retry policy.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ILoveVideoEditor
|
|
17
|
+
class CreateCheckoutSessionRequest < ApiModelBase
|
|
18
|
+
attr_accessor :product_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :tier_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :mode
|
|
23
|
+
|
|
24
|
+
attr_accessor :credits
|
|
25
|
+
|
|
26
|
+
class EnumAttributeValidator
|
|
27
|
+
attr_reader :datatype
|
|
28
|
+
attr_reader :allowable_values
|
|
29
|
+
|
|
30
|
+
def initialize(datatype, allowable_values)
|
|
31
|
+
@allowable_values = allowable_values.map do |value|
|
|
32
|
+
case datatype.to_s
|
|
33
|
+
when /Integer/i
|
|
34
|
+
value.to_i
|
|
35
|
+
when /Float/i
|
|
36
|
+
value.to_f
|
|
37
|
+
else
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def valid?(value)
|
|
44
|
+
!value || allowable_values.include?(value)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
|
+
def self.attribute_map
|
|
50
|
+
{
|
|
51
|
+
:'product_id' => :'productId',
|
|
52
|
+
:'tier_id' => :'tierId',
|
|
53
|
+
:'mode' => :'mode',
|
|
54
|
+
:'credits' => :'credits'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns attribute mapping this model knows about
|
|
59
|
+
def self.acceptable_attribute_map
|
|
60
|
+
attribute_map
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns all the JSON keys this model knows about
|
|
64
|
+
def self.acceptable_attributes
|
|
65
|
+
acceptable_attribute_map.values
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Attribute type mapping.
|
|
69
|
+
def self.openapi_types
|
|
70
|
+
{
|
|
71
|
+
:'product_id' => :'String',
|
|
72
|
+
:'tier_id' => :'String',
|
|
73
|
+
:'mode' => :'String',
|
|
74
|
+
:'credits' => :'Integer'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# List of attributes with nullable: true
|
|
79
|
+
def self.openapi_nullable
|
|
80
|
+
Set.new([
|
|
81
|
+
])
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Initializes the object
|
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
86
|
+
def initialize(attributes = {})
|
|
87
|
+
if (!attributes.is_a?(Hash))
|
|
88
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ILoveVideoEditor::CreateCheckoutSessionRequest` initialize method"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
92
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
93
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
94
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
95
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ILoveVideoEditor::CreateCheckoutSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
96
|
+
end
|
|
97
|
+
h[k.to_sym] = v
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'product_id')
|
|
101
|
+
self.product_id = attributes[:'product_id']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'tier_id')
|
|
105
|
+
self.tier_id = attributes[:'tier_id']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'mode')
|
|
109
|
+
self.mode = attributes[:'mode']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'credits')
|
|
113
|
+
self.credits = attributes[:'credits']
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
118
|
+
# @return Array for valid properties with the reasons
|
|
119
|
+
def list_invalid_properties
|
|
120
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
121
|
+
invalid_properties = Array.new
|
|
122
|
+
invalid_properties
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Check to see if the all the properties in the model are valid
|
|
126
|
+
# @return true if the model is valid
|
|
127
|
+
def valid?
|
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
|
+
tier_id_validator = EnumAttributeValidator.new('String', ["free", "starter", "pro", "business"])
|
|
130
|
+
return false unless tier_id_validator.valid?(@tier_id)
|
|
131
|
+
mode_validator = EnumAttributeValidator.new('String', ["subscription", "payment"])
|
|
132
|
+
return false unless mode_validator.valid?(@mode)
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
137
|
+
# @param [Object] tier_id Object to be assigned
|
|
138
|
+
def tier_id=(tier_id)
|
|
139
|
+
validator = EnumAttributeValidator.new('String', ["free", "starter", "pro", "business"])
|
|
140
|
+
unless validator.valid?(tier_id)
|
|
141
|
+
fail ArgumentError, "invalid value for \"tier_id\", must be one of #{validator.allowable_values}."
|
|
142
|
+
end
|
|
143
|
+
@tier_id = tier_id
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
147
|
+
# @param [Object] mode Object to be assigned
|
|
148
|
+
def mode=(mode)
|
|
149
|
+
validator = EnumAttributeValidator.new('String', ["subscription", "payment"])
|
|
150
|
+
unless validator.valid?(mode)
|
|
151
|
+
fail ArgumentError, "invalid value for \"mode\", must be one of #{validator.allowable_values}."
|
|
152
|
+
end
|
|
153
|
+
@mode = mode
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Checks equality by comparing each attribute.
|
|
157
|
+
# @param [Object] Object to be compared
|
|
158
|
+
def ==(o)
|
|
159
|
+
return true if self.equal?(o)
|
|
160
|
+
self.class == o.class &&
|
|
161
|
+
product_id == o.product_id &&
|
|
162
|
+
tier_id == o.tier_id &&
|
|
163
|
+
mode == o.mode &&
|
|
164
|
+
credits == o.credits
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @see the `==` method
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def eql?(o)
|
|
170
|
+
self == o
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Calculates hash code according to all attributes.
|
|
174
|
+
# @return [Integer] Hash code
|
|
175
|
+
def hash
|
|
176
|
+
[product_id, tier_id, mode, credits].hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Builds the object from hash
|
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
181
|
+
# @return [Object] Returns the model itself
|
|
182
|
+
def self.build_from_hash(attributes)
|
|
183
|
+
return nil unless attributes.is_a?(Hash)
|
|
184
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
185
|
+
transformed_hash = {}
|
|
186
|
+
openapi_types.each_pair do |key, type|
|
|
187
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
188
|
+
transformed_hash["#{key}"] = nil
|
|
189
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
190
|
+
# check to ensure the input is an array given that the attribute
|
|
191
|
+
# is documented as an array but the input is not
|
|
192
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
193
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
194
|
+
end
|
|
195
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
196
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
new(transformed_hash)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the object in the form of hash
|
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
|
204
|
+
def to_hash
|
|
205
|
+
hash = {}
|
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
207
|
+
value = self.send(attr)
|
|
208
|
+
if value.nil?
|
|
209
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
210
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
hash[param] = _to_hash(value)
|
|
214
|
+
end
|
|
215
|
+
hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|