diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 3051f48..5e6b5bc 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -192,8 +192,12 @@ docs/ProjectsQualityPerformanceScoreRequest.md docs/QualityPerformanceScoreApi.md docs/Release.md docs/ReleaseCreateParameters.md +docs/ReleaseCreateParameters1.md docs/ReleasePreview.md +docs/ReleaseTrigger.md +docs/ReleaseTriggersApi.md docs/ReleaseUpdateParameters.md +docs/ReleaseUpdateParameters1.md docs/ReleasesApi.md docs/RepliesListParameters.md docs/RepoSync.md @@ -318,6 +322,7 @@ lib/phrase/api/organization_job_template_locales_api.rb lib/phrase/api/organization_job_templates_api.rb lib/phrase/api/projects_api.rb lib/phrase/api/quality_performance_score_api.rb +lib/phrase/api/release_triggers_api.rb lib/phrase/api/releases_api.rb lib/phrase/api/repo_syncs_api.rb lib/phrase/api/reports_api.rb @@ -486,8 +491,11 @@ lib/phrase/models/projects_quality_performance_score200_response_any_of_errors_i lib/phrase/models/projects_quality_performance_score_request.rb lib/phrase/models/release.rb lib/phrase/models/release_create_parameters.rb +lib/phrase/models/release_create_parameters1.rb lib/phrase/models/release_preview.rb +lib/phrase/models/release_trigger.rb lib/phrase/models/release_update_parameters.rb +lib/phrase/models/release_update_parameters1.rb lib/phrase/models/replies_list_parameters.rb lib/phrase/models/repo_sync.rb lib/phrase/models/repo_sync_event.rb @@ -594,6 +602,7 @@ spec/api/organization_job_template_locales_api_spec.rb spec/api/organization_job_templates_api_spec.rb spec/api/projects_api_spec.rb spec/api/quality_performance_score_api_spec.rb +spec/api/release_triggers_api_spec.rb spec/api/releases_api_spec.rb spec/api/repo_syncs_api_spec.rb spec/api/reports_api_spec.rb @@ -758,9 +767,12 @@ spec/models/projects_quality_performance_score200_response_any_of_errors_inner_s spec/models/projects_quality_performance_score200_response_any_of_spec.rb spec/models/projects_quality_performance_score200_response_spec.rb spec/models/projects_quality_performance_score_request_spec.rb +spec/models/release_create_parameters1_spec.rb spec/models/release_create_parameters_spec.rb spec/models/release_preview_spec.rb spec/models/release_spec.rb +spec/models/release_trigger_spec.rb +spec/models/release_update_parameters1_spec.rb spec/models/release_update_parameters_spec.rb spec/models/replies_list_parameters_spec.rb spec/models/repo_sync_event_errors_inner_spec.rb diff --git a/README.md b/README.md index 60cfa42..5641884 100644 --- a/README.md +++ b/README.md @@ -310,6 +310,11 @@ Class | Method | HTTP request | Description *Phrase::ProjectsApi* | [**project_update**](docs/ProjectsApi.md#project_update) | **PATCH** /projects/{id} | Update a project *Phrase::ProjectsApi* | [**projects_list**](docs/ProjectsApi.md#projects_list) | **GET** /projects | List projects *Phrase::QualityPerformanceScoreApi* | [**projects_quality_performance_score**](docs/QualityPerformanceScoreApi.md#projects_quality_performance_score) | **POST** /projects/{project_id}/quality_performance_score | Get Translation Quality +*Phrase::ReleaseTriggersApi* | [**release_triggers_create**](docs/ReleaseTriggersApi.md#release_triggers_create) | **POST** /accounts/{account_id}/distributions/{distribution_id}/release_triggers | Create a release trigger +*Phrase::ReleaseTriggersApi* | [**release_triggers_destroy**](docs/ReleaseTriggersApi.md#release_triggers_destroy) | **DELETE** /accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id} | Delete a single release trigger +*Phrase::ReleaseTriggersApi* | [**release_triggers_list**](docs/ReleaseTriggersApi.md#release_triggers_list) | **GET** /accounts/{account_id}/distributions/{distribution_id}/release_triggers | List release triggers +*Phrase::ReleaseTriggersApi* | [**release_triggers_show**](docs/ReleaseTriggersApi.md#release_triggers_show) | **GET** /accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id} | Get a single release trigger +*Phrase::ReleaseTriggersApi* | [**release_triggers_update**](docs/ReleaseTriggersApi.md#release_triggers_update) | **PATCH** /accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id} | Update a release trigger *Phrase::ReleasesApi* | [**release_create**](docs/ReleasesApi.md#release_create) | **POST** /accounts/{account_id}/distributions/{distribution_id}/releases | Create a release *Phrase::ReleasesApi* | [**release_delete**](docs/ReleasesApi.md#release_delete) | **DELETE** /accounts/{account_id}/distributions/{distribution_id}/releases/{id} | Delete a release *Phrase::ReleasesApi* | [**release_publish**](docs/ReleasesApi.md#release_publish) | **POST** /accounts/{account_id}/distributions/{distribution_id}/releases/{id}/publish | Publish a release @@ -553,8 +558,11 @@ Class | Method | HTTP request | Description - [Phrase::ProjectsQualityPerformanceScoreRequest](docs/ProjectsQualityPerformanceScoreRequest.md) - [Phrase::Release](docs/Release.md) - [Phrase::ReleaseCreateParameters](docs/ReleaseCreateParameters.md) + - [Phrase::ReleaseCreateParameters1](docs/ReleaseCreateParameters1.md) - [Phrase::ReleasePreview](docs/ReleasePreview.md) + - [Phrase::ReleaseTrigger](docs/ReleaseTrigger.md) - [Phrase::ReleaseUpdateParameters](docs/ReleaseUpdateParameters.md) + - [Phrase::ReleaseUpdateParameters1](docs/ReleaseUpdateParameters1.md) - [Phrase::RepliesListParameters](docs/RepliesListParameters.md) - [Phrase::RepoSync](docs/RepoSync.md) - [Phrase::RepoSyncEvent](docs/RepoSyncEvent.md) diff --git a/docs/KeyCreateParameters.md b/docs/KeyCreateParameters.md index 0c6a956..c5b064a 100644 --- a/docs/KeyCreateParameters.md +++ b/docs/KeyCreateParameters.md @@ -35,7 +35,7 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch, data_type: number, tags: awesome-feature,needs-proofreading, max_characters_allowed: 140, - screenshot: [B@12b67070, + screenshot: [B@68017525, remove_screenshot: null, unformatted: null, default_translation_content: Default translation content, diff --git a/docs/KeyUpdateParameters.md b/docs/KeyUpdateParameters.md index da0627a..c93090e 100644 --- a/docs/KeyUpdateParameters.md +++ b/docs/KeyUpdateParameters.md @@ -34,7 +34,7 @@ instance = Phrase::KeyUpdateParameters.new(branch: my-feature-branch, data_type: number, tags: awesome-feature,needs-proofreading, max_characters_allowed: 140, - screenshot: [B@f33b8fc, + screenshot: [B@434d5eb9, remove_screenshot: null, unformatted: null, xml_space_preserve: null, diff --git a/docs/ProjectCreateParameters.md b/docs/ProjectCreateParameters.md index 5eb448a..aaf0d31 100644 --- a/docs/ProjectCreateParameters.md +++ b/docs/ProjectCreateParameters.md @@ -40,7 +40,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project, main_format: yml, media: Python, shares_translation_memory: true, - project_image: [B@4e4892bf, + project_image: [B@4cec414d, remove_project_image: null, account_id: abcd1234, point_of_contact: abcd1234, diff --git a/docs/ProjectUpdateParameters.md b/docs/ProjectUpdateParameters.md index efb63cf..ce23068 100644 --- a/docs/ProjectUpdateParameters.md +++ b/docs/ProjectUpdateParameters.md @@ -41,7 +41,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234, main_format: yml, media: Python, shares_translation_memory: true, - project_image: [B@59889208, + project_image: [B@62a939cd, remove_project_image: false, workflow: review, machine_translation_enabled: true, diff --git a/docs/ReleaseCreateParameters1.md b/docs/ReleaseCreateParameters1.md new file mode 100644 index 0000000..4e2ff11 --- /dev/null +++ b/docs/ReleaseCreateParameters1.md @@ -0,0 +1,29 @@ +# Phrase::ReleaseCreateParameters1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cron_schedule** | **String** | Cron schedule for the scheduler. Read more about the format of this field at https://en.wikipedia.org/wiki/Cron | [optional] +**time_zone** | **String** | Time zone for the scheduler | [optional] +**locale_ids** | **Array<String>** | List of locale ids that will be included in the release. | [optional] +**tags** | **Array<String>** | Only include tagged keys in the release. For a key to be included it must be tagged with all tags provided | [optional] +**branch** | **String** | Branch used for release | [optional] +**app_min_version** | **String** | The created releases will be available only for apps with version greater or equal to this value | [optional] +**app_max_version** | **String** | The created releases will be available only for apps with version less or equal to this value | [optional] + +## Code Sample + +```ruby +require 'Phrase' + +instance = Phrase::ReleaseCreateParameters1.new(cron_schedule: 15 18 * * 1,3, + time_zone: Europe/Berlin, + locale_ids: ["abcd1234cdef1234abcd1234cdef1234","fff565db236400772368235db2c6117e"], + tags: ["android","feature1"], + branch: my-feature-branch, + app_min_version: 1.0.0, + app_max_version: 2.0.0) +``` + + diff --git a/docs/ReleaseTrigger.md b/docs/ReleaseTrigger.md new file mode 100644 index 0000000..b2b6643 --- /dev/null +++ b/docs/ReleaseTrigger.md @@ -0,0 +1,37 @@ +# Phrase::ReleaseTrigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**branch** | **String** | | [optional] +**cron_schedule** | **String** | Cron schedule for the scheduler. Read more about the format of this field at https://en.wikipedia.org/wiki/Cron | [optional] +**time_zone** | **String** | Time zone for the scheduler | [optional] +**next_run_at** | **Time** | The next time a release will be created for this trigger | [optional] +**app_min_version** | **String** | | [optional] +**app_max_version** | **String** | | [optional] +**locales** | [**Array<LocalePreview>**](LocalePreview.md) | | [optional] +**tags** | **Array<String>** | | [optional] +**created_at** | **Time** | | [optional] +**updated_at** | **Time** | | [optional] + +## Code Sample + +```ruby +require 'Phrase' + +instance = Phrase::ReleaseTrigger.new(id: null, + branch: null, + cron_schedule: null, + time_zone: null, + next_run_at: null, + app_min_version: null, + app_max_version: null, + locales: null, + tags: null, + created_at: null, + updated_at: null) +``` + + diff --git a/docs/ReleaseTriggersApi.md b/docs/ReleaseTriggersApi.md new file mode 100644 index 0000000..c5a28cb --- /dev/null +++ b/docs/ReleaseTriggersApi.md @@ -0,0 +1,337 @@ +# Phrase::ReleaseTriggersApi + +All URIs are relative to *https://api.phrase.com/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**release_triggers_create**](ReleaseTriggersApi.md#release_triggers_create) | **POST** /accounts/{account_id}/distributions/{distribution_id}/release_triggers | Create a release trigger +[**release_triggers_destroy**](ReleaseTriggersApi.md#release_triggers_destroy) | **DELETE** /accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id} | Delete a single release trigger +[**release_triggers_list**](ReleaseTriggersApi.md#release_triggers_list) | **GET** /accounts/{account_id}/distributions/{distribution_id}/release_triggers | List release triggers +[**release_triggers_show**](ReleaseTriggersApi.md#release_triggers_show) | **GET** /accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id} | Get a single release trigger +[**release_triggers_update**](ReleaseTriggersApi.md#release_triggers_update) | **PATCH** /accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id} | Update a release trigger + + + +## release_triggers_create + +> ReleaseTrigger release_triggers_create(account_id, distribution_id, release_create_parameters1, opts) + +Create a release trigger + +Create a new recurring release. New releases will be published automatically, based on the cron schedule provided. Currently, only one release trigger can exist per distribution. + +### Example + +```ruby +# load the gem +require 'phrase' +# setup authorization +Phrase.configure do |config| + # Configure HTTP basic authorization: Basic + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' + + # Configure API key authorization: Token + config.api_key['Authorization'] = 'YOUR API KEY' + config.api_key_prefix['Authorization'] = 'token' +end + +api_instance = Phrase::ReleaseTriggersApi.new +account_id = 'account_id_example' # String | Account ID +distribution_id = 'distribution_id_example' # String | Distribution ID +release_create_parameters1 = Phrase::ReleaseCreateParameters1.new # ReleaseCreateParameters1 | +opts = { + x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional) +} + +begin + #Create a release trigger + result = api_instance.release_triggers_create(account_id, distribution_id, release_create_parameters1, opts) + pp result +rescue Phrase::ApiError => e + puts "Exception when calling ReleaseTriggersApi->release_triggers_create: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **String**| Account ID | + **distribution_id** | **String**| Distribution ID | + **release_create_parameters1** | [**ReleaseCreateParameters1**](ReleaseCreateParameters1.md)| | + **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional] + +### Return type + +Response<([**ReleaseTrigger**](ReleaseTrigger.md))> + +### Authorization + +[Basic](../README.md#Basic), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## release_triggers_destroy + +> release_triggers_destroy(account_id, distribution_id, id, opts) + +Delete a single release trigger + +Delete a single release trigger. + +### Example + +```ruby +# load the gem +require 'phrase' +# setup authorization +Phrase.configure do |config| + # Configure HTTP basic authorization: Basic + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' + + # Configure API key authorization: Token + config.api_key['Authorization'] = 'YOUR API KEY' + config.api_key_prefix['Authorization'] = 'token' +end + +api_instance = Phrase::ReleaseTriggersApi.new +account_id = 'account_id_example' # String | Account ID +distribution_id = 'distribution_id_example' # String | Distribution ID +id = 'id_example' # String | ID +opts = { + x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional) +} + +begin + #Delete a single release trigger + api_instance.release_triggers_destroy(account_id, distribution_id, id, opts) +rescue Phrase::ApiError => e + puts "Exception when calling ReleaseTriggersApi->release_triggers_destroy: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **String**| Account ID | + **distribution_id** | **String**| Distribution ID | + **id** | **String**| ID | + **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional] + +### Return type + +Response<(nil (empty response body))> + +### Authorization + +[Basic](../README.md#Basic), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## release_triggers_list + +> Array<ReleaseTrigger> release_triggers_list(account_id, distribution_id, opts) + +List release triggers + +List all release triggers for the given distribution.
Note: Currently only one release trigger can exist per distribution. + +### Example + +```ruby +# load the gem +require 'phrase' +# setup authorization +Phrase.configure do |config| + # Configure HTTP basic authorization: Basic + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' + + # Configure API key authorization: Token + config.api_key['Authorization'] = 'YOUR API KEY' + config.api_key_prefix['Authorization'] = 'token' +end + +api_instance = Phrase::ReleaseTriggersApi.new +account_id = 'account_id_example' # String | Account ID +distribution_id = 'distribution_id_example' # String | Distribution ID +opts = { + x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional) +} + +begin + #List release triggers + result = api_instance.release_triggers_list(account_id, distribution_id, opts) + pp result +rescue Phrase::ApiError => e + puts "Exception when calling ReleaseTriggersApi->release_triggers_list: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **String**| Account ID | + **distribution_id** | **String**| Distribution ID | + **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional] + +### Return type + +Response<([**Array<ReleaseTrigger>**](ReleaseTrigger.md))> + +### Authorization + +[Basic](../README.md#Basic), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## release_triggers_show + +> ReleaseTrigger release_triggers_show(account_id, distribution_id, id, opts) + +Get a single release trigger + +Get details of a single release trigger. + +### Example + +```ruby +# load the gem +require 'phrase' +# setup authorization +Phrase.configure do |config| + # Configure HTTP basic authorization: Basic + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' + + # Configure API key authorization: Token + config.api_key['Authorization'] = 'YOUR API KEY' + config.api_key_prefix['Authorization'] = 'token' +end + +api_instance = Phrase::ReleaseTriggersApi.new +account_id = 'account_id_example' # String | Account ID +distribution_id = 'distribution_id_example' # String | Distribution ID +id = 'id_example' # String | ID +opts = { + x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional) +} + +begin + #Get a single release trigger + result = api_instance.release_triggers_show(account_id, distribution_id, id, opts) + pp result +rescue Phrase::ApiError => e + puts "Exception when calling ReleaseTriggersApi->release_triggers_show: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **String**| Account ID | + **distribution_id** | **String**| Distribution ID | + **id** | **String**| ID | + **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional] + +### Return type + +Response<([**ReleaseTrigger**](ReleaseTrigger.md))> + +### Authorization + +[Basic](../README.md#Basic), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## release_triggers_update + +> ReleaseTrigger release_triggers_update(account_id, distribution_id, id, release_update_parameters1, opts) + +Update a release trigger + +Update a recurring release. + +### Example + +```ruby +# load the gem +require 'phrase' +# setup authorization +Phrase.configure do |config| + # Configure HTTP basic authorization: Basic + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' + + # Configure API key authorization: Token + config.api_key['Authorization'] = 'YOUR API KEY' + config.api_key_prefix['Authorization'] = 'token' +end + +api_instance = Phrase::ReleaseTriggersApi.new +account_id = 'account_id_example' # String | Account ID +distribution_id = 'distribution_id_example' # String | Distribution ID +id = 'id_example' # String | ID +release_update_parameters1 = Phrase::ReleaseUpdateParameters1.new # ReleaseUpdateParameters1 | +opts = { + x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional) +} + +begin + #Update a release trigger + result = api_instance.release_triggers_update(account_id, distribution_id, id, release_update_parameters1, opts) + pp result +rescue Phrase::ApiError => e + puts "Exception when calling ReleaseTriggersApi->release_triggers_update: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **String**| Account ID | + **distribution_id** | **String**| Distribution ID | + **id** | **String**| ID | + **release_update_parameters1** | [**ReleaseUpdateParameters1**](ReleaseUpdateParameters1.md)| | + **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional] + +### Return type + +Response<([**ReleaseTrigger**](ReleaseTrigger.md))> + +### Authorization + +[Basic](../README.md#Basic), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/ReleaseUpdateParameters1.md b/docs/ReleaseUpdateParameters1.md new file mode 100644 index 0000000..ac40a4f --- /dev/null +++ b/docs/ReleaseUpdateParameters1.md @@ -0,0 +1,29 @@ +# Phrase::ReleaseUpdateParameters1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cron_schedule** | **String** | Cron schedule for the scheduler. Read more about the format of this field at https://en.wikipedia.org/wiki/Cron | [optional] +**time_zone** | **String** | Time zone for the scheduler | [optional] +**locale_ids** | **Array<String>** | List of locale ids that will be included in the release. | [optional] +**tags** | **Array<String>** | Only include tagged keys in the release. For a key to be included it must be tagged with all tags provided | [optional] +**branch** | **String** | Branch used for release | [optional] +**app_min_version** | **String** | The created releases will be available only for apps with version greater or equal to this value | [optional] +**app_max_version** | **String** | The created releases will be available only for apps with version less or equal to this value | [optional] + +## Code Sample + +```ruby +require 'Phrase' + +instance = Phrase::ReleaseUpdateParameters1.new(cron_schedule: 15 18 * * 1,3, + time_zone: Europe/Berlin, + locale_ids: ["abcd1234cdef1234abcd1234cdef1234","fff565db236400772368235db2c6117e"], + tags: ["android","feature1"], + branch: my-feature-branch, + app_min_version: 1.0.0, + app_max_version: 2.0.0) +``` + + diff --git a/docs/ScreenshotUpdateParameters.md b/docs/ScreenshotUpdateParameters.md index 1309016..827ab69 100644 --- a/docs/ScreenshotUpdateParameters.md +++ b/docs/ScreenshotUpdateParameters.md @@ -17,7 +17,7 @@ require 'Phrase' instance = Phrase::ScreenshotUpdateParameters.new(branch: my-feature-branch, name: A screenshot name, description: A screenshot description, - filename: [B@1861c4a9) + filename: [B@46c9a298) ``` diff --git a/lib/phrase.rb b/lib/phrase.rb index dc05510..e5a87d7 100644 --- a/lib/phrase.rb +++ b/lib/phrase.rb @@ -156,8 +156,11 @@ require 'phrase/models/projects_quality_performance_score_request' require 'phrase/models/release' require 'phrase/models/release_create_parameters' +require 'phrase/models/release_create_parameters1' require 'phrase/models/release_preview' +require 'phrase/models/release_trigger' require 'phrase/models/release_update_parameters' +require 'phrase/models/release_update_parameters1' require 'phrase/models/replies_list_parameters' require 'phrase/models/repo_sync' require 'phrase/models/repo_sync_event' @@ -265,6 +268,7 @@ require 'phrase/api/organization_job_templates_api' require 'phrase/api/projects_api' require 'phrase/api/quality_performance_score_api' +require 'phrase/api/release_triggers_api' require 'phrase/api/releases_api' require 'phrase/api/repo_syncs_api' require 'phrase/api/reports_api' diff --git a/lib/phrase/api/release_triggers_api.rb b/lib/phrase/api/release_triggers_api.rb new file mode 100644 index 0000000..0ab4fb5 --- /dev/null +++ b/lib/phrase/api/release_triggers_api.rb @@ -0,0 +1,402 @@ +require 'cgi' + +module Phrase + class ReleaseTriggersApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Create a release trigger + # Create a new recurring release. New releases will be published automatically, based on the cron schedule provided. Currently, only one release trigger can exist per distribution. + # @param account_id [String] Account ID + # @param distribution_id [String] Distribution ID + # @param release_create_parameters1 [ReleaseCreateParameters1] + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [ReleaseTrigger] + def release_triggers_create(account_id, distribution_id, release_create_parameters1, opts = {}) + data, _status_code, _headers = release_triggers_create_with_http_info(account_id, distribution_id, release_create_parameters1, opts) + data + end + + # Create a release trigger + # Create a new recurring release. New releases will be published automatically, based on the cron schedule provided. Currently, only one release trigger can exist per distribution. + # @param account_id [String] Account ID + # @param distribution_id [String] Distribution ID + # @param release_create_parameters1 [ReleaseCreateParameters1] + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [Array<(Response<(ReleaseTrigger)>, Integer, Hash)>] Response<(ReleaseTrigger)> data, response status code and response headers + def release_triggers_create_with_http_info(account_id, distribution_id, release_create_parameters1, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReleaseTriggersApi.release_triggers_create ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleaseTriggersApi.release_triggers_create" + end + # verify the required parameter 'distribution_id' is set + if @api_client.config.client_side_validation && distribution_id.nil? + fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleaseTriggersApi.release_triggers_create" + end + # verify the required parameter 'release_create_parameters1' is set + if @api_client.config.client_side_validation && release_create_parameters1.nil? + fail ArgumentError, "Missing the required parameter 'release_create_parameters1' when calling ReleaseTriggersApi.release_triggers_create" + end + # resource path + local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/release_triggers'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(release_create_parameters1) + + # return_type + return_type = opts[:return_type] || 'ReleaseTrigger' + + # auth_names + auth_names = opts[:auth_names] || ['Basic', 'Token'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReleaseTriggersApi#release_triggers_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + response = ::Phrase::Response.new(data, headers) + return response, status_code, headers + end + + # Delete a single release trigger + # Delete a single release trigger. + # @param account_id [String] Account ID + # @param distribution_id [String] Distribution ID + # @param id [String] ID + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [nil] + def release_triggers_destroy(account_id, distribution_id, id, opts = {}) + data, _status_code, _headers = release_triggers_destroy_with_http_info(account_id, distribution_id, id, opts) + data + end + + # Delete a single release trigger + # Delete a single release trigger. + # @param account_id [String] Account ID + # @param distribution_id [String] Distribution ID + # @param id [String] ID + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers + def release_triggers_destroy_with_http_info(account_id, distribution_id, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReleaseTriggersApi.release_triggers_destroy ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleaseTriggersApi.release_triggers_destroy" + end + # verify the required parameter 'distribution_id' is set + if @api_client.config.client_side_validation && distribution_id.nil? + fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleaseTriggersApi.release_triggers_destroy" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling ReleaseTriggersApi.release_triggers_destroy" + end + # resource path + local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] + + # auth_names + auth_names = opts[:auth_names] || ['Basic', 'Token'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReleaseTriggersApi#release_triggers_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + response = ::Phrase::Response.new(data, headers) + return response, status_code, headers + end + + # List release triggers + # List all release triggers for the given distribution.
Note: Currently only one release trigger can exist per distribution. + # @param account_id [String] Account ID + # @param distribution_id [String] Distribution ID + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [Array] + def release_triggers_list(account_id, distribution_id, opts = {}) + data, _status_code, _headers = release_triggers_list_with_http_info(account_id, distribution_id, opts) + data + end + + # List release triggers + # List all release triggers for the given distribution.<br> Note: Currently only one release trigger can exist per distribution. + # @param account_id [String] Account ID + # @param distribution_id [String] Distribution ID + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [Array<(Response<(Array)>, Integer, Hash)>] Response<(Array)> data, response status code and response headers + def release_triggers_list_with_http_info(account_id, distribution_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReleaseTriggersApi.release_triggers_list ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleaseTriggersApi.release_triggers_list" + end + # verify the required parameter 'distribution_id' is set + if @api_client.config.client_side_validation && distribution_id.nil? + fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleaseTriggersApi.release_triggers_list" + end + # resource path + local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/release_triggers'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] || 'Array' + + # auth_names + auth_names = opts[:auth_names] || ['Basic', 'Token'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReleaseTriggersApi#release_triggers_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + response = ::Phrase::Response.new(data, headers) + return response, status_code, headers + end + + # Get a single release trigger + # Get details of a single release trigger. + # @param account_id [String] Account ID + # @param distribution_id [String] Distribution ID + # @param id [String] ID + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [ReleaseTrigger] + def release_triggers_show(account_id, distribution_id, id, opts = {}) + data, _status_code, _headers = release_triggers_show_with_http_info(account_id, distribution_id, id, opts) + data + end + + # Get a single release trigger + # Get details of a single release trigger. + # @param account_id [String] Account ID + # @param distribution_id [String] Distribution ID + # @param id [String] ID + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [Array<(Response<(ReleaseTrigger)>, Integer, Hash)>] Response<(ReleaseTrigger)> data, response status code and response headers + def release_triggers_show_with_http_info(account_id, distribution_id, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReleaseTriggersApi.release_triggers_show ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleaseTriggersApi.release_triggers_show" + end + # verify the required parameter 'distribution_id' is set + if @api_client.config.client_side_validation && distribution_id.nil? + fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleaseTriggersApi.release_triggers_show" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling ReleaseTriggersApi.release_triggers_show" + end + # resource path + local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] + + # return_type + return_type = opts[:return_type] || 'ReleaseTrigger' + + # auth_names + auth_names = opts[:auth_names] || ['Basic', 'Token'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReleaseTriggersApi#release_triggers_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + response = ::Phrase::Response.new(data, headers) + return response, status_code, headers + end + + # Update a release trigger + # Update a recurring release. + # @param account_id [String] Account ID + # @param distribution_id [String] Distribution ID + # @param id [String] ID + # @param release_update_parameters1 [ReleaseUpdateParameters1] + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [ReleaseTrigger] + def release_triggers_update(account_id, distribution_id, id, release_update_parameters1, opts = {}) + data, _status_code, _headers = release_triggers_update_with_http_info(account_id, distribution_id, id, release_update_parameters1, opts) + data + end + + # Update a release trigger + # Update a recurring release. + # @param account_id [String] Account ID + # @param distribution_id [String] Distribution ID + # @param id [String] ID + # @param release_update_parameters1 [ReleaseUpdateParameters1] + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [Array<(Response<(ReleaseTrigger)>, Integer, Hash)>] Response<(ReleaseTrigger)> data, response status code and response headers + def release_triggers_update_with_http_info(account_id, distribution_id, id, release_update_parameters1, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReleaseTriggersApi.release_triggers_update ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleaseTriggersApi.release_triggers_update" + end + # verify the required parameter 'distribution_id' is set + if @api_client.config.client_side_validation && distribution_id.nil? + fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleaseTriggersApi.release_triggers_update" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling ReleaseTriggersApi.release_triggers_update" + end + # verify the required parameter 'release_update_parameters1' is set + if @api_client.config.client_side_validation && release_update_parameters1.nil? + fail ArgumentError, "Missing the required parameter 'release_update_parameters1' when calling ReleaseTriggersApi.release_triggers_update" + end + # resource path + local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(release_update_parameters1) + + # return_type + return_type = opts[:return_type] || 'ReleaseTrigger' + + # auth_names + auth_names = opts[:auth_names] || ['Basic', 'Token'] + + new_options = opts.merge( + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReleaseTriggersApi#release_triggers_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + response = ::Phrase::Response.new(data, headers) + return response, status_code, headers + end + end +end diff --git a/lib/phrase/models/release_create_parameters1.rb b/lib/phrase/models/release_create_parameters1.rb new file mode 100644 index 0000000..cd7b8ab --- /dev/null +++ b/lib/phrase/models/release_create_parameters1.rb @@ -0,0 +1,261 @@ +require 'date' + +module Phrase + class ReleaseCreateParameters1 + # Cron schedule for the scheduler. Read more about the format of this field at https://en.wikipedia.org/wiki/Cron + attr_accessor :cron_schedule + + # Time zone for the scheduler + attr_accessor :time_zone + + # List of locale ids that will be included in the release. + attr_accessor :locale_ids + + # Only include tagged keys in the release. For a key to be included it must be tagged with all tags provided + attr_accessor :tags + + # Branch used for release + attr_accessor :branch + + # The created releases will be available only for apps with version greater or equal to this value + attr_accessor :app_min_version + + # The created releases will be available only for apps with version less or equal to this value + attr_accessor :app_max_version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cron_schedule' => :'cron_schedule', + :'time_zone' => :'time_zone', + :'locale_ids' => :'locale_ids', + :'tags' => :'tags', + :'branch' => :'branch', + :'app_min_version' => :'app_min_version', + :'app_max_version' => :'app_max_version' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'cron_schedule' => :'String', + :'time_zone' => :'String', + :'locale_ids' => :'Array', + :'tags' => :'Array', + :'branch' => :'String', + :'app_min_version' => :'String', + :'app_max_version' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::ReleaseCreateParameters1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::ReleaseCreateParameters1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'cron_schedule') + self.cron_schedule = attributes[:'cron_schedule'] + end + + if attributes.key?(:'time_zone') + self.time_zone = attributes[:'time_zone'] + end + + if attributes.key?(:'locale_ids') + if (value = attributes[:'locale_ids']).is_a?(Array) + self.locale_ids = value + end + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'branch') + self.branch = attributes[:'branch'] + end + + if attributes.key?(:'app_min_version') + self.app_min_version = attributes[:'app_min_version'] + end + + if attributes.key?(:'app_max_version') + self.app_max_version = attributes[:'app_max_version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cron_schedule == o.cron_schedule && + time_zone == o.time_zone && + locale_ids == o.locale_ids && + tags == o.tags && + branch == o.branch && + app_min_version == o.app_min_version && + app_max_version == o.app_max_version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cron_schedule, time_zone, locale_ids, tags, branch, app_min_version, app_max_version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :Time + Time.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Phrase.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/phrase/models/release_trigger.rb b/lib/phrase/models/release_trigger.rb new file mode 100644 index 0000000..b91af6f --- /dev/null +++ b/lib/phrase/models/release_trigger.rb @@ -0,0 +1,293 @@ +require 'date' + +module Phrase + class ReleaseTrigger + attr_accessor :id + + attr_accessor :branch + + # Cron schedule for the scheduler. Read more about the format of this field at https://en.wikipedia.org/wiki/Cron + attr_accessor :cron_schedule + + # Time zone for the scheduler + attr_accessor :time_zone + + # The next time a release will be created for this trigger + attr_accessor :next_run_at + + attr_accessor :app_min_version + + attr_accessor :app_max_version + + attr_accessor :locales + + attr_accessor :tags + + attr_accessor :created_at + + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'branch' => :'branch', + :'cron_schedule' => :'cron_schedule', + :'time_zone' => :'time_zone', + :'next_run_at' => :'next_run_at', + :'app_min_version' => :'app_min_version', + :'app_max_version' => :'app_max_version', + :'locales' => :'locales', + :'tags' => :'tags', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'branch' => :'String', + :'cron_schedule' => :'String', + :'time_zone' => :'String', + :'next_run_at' => :'DateTime', + :'app_min_version' => :'String', + :'app_max_version' => :'String', + :'locales' => :'Array', + :'tags' => :'Array', + :'created_at' => :'DateTime', + :'updated_at' => :'DateTime' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::ReleaseTrigger` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::ReleaseTrigger`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'branch') + self.branch = attributes[:'branch'] + end + + if attributes.key?(:'cron_schedule') + self.cron_schedule = attributes[:'cron_schedule'] + end + + if attributes.key?(:'time_zone') + self.time_zone = attributes[:'time_zone'] + end + + if attributes.key?(:'next_run_at') + self.next_run_at = attributes[:'next_run_at'] + end + + if attributes.key?(:'app_min_version') + self.app_min_version = attributes[:'app_min_version'] + end + + if attributes.key?(:'app_max_version') + self.app_max_version = attributes[:'app_max_version'] + end + + if attributes.key?(:'locales') + if (value = attributes[:'locales']).is_a?(Array) + self.locales = value + end + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + branch == o.branch && + cron_schedule == o.cron_schedule && + time_zone == o.time_zone && + next_run_at == o.next_run_at && + app_min_version == o.app_min_version && + app_max_version == o.app_max_version && + locales == o.locales && + tags == o.tags && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, branch, cron_schedule, time_zone, next_run_at, app_min_version, app_max_version, locales, tags, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :Time + Time.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Phrase.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/phrase/models/release_update_parameters1.rb b/lib/phrase/models/release_update_parameters1.rb new file mode 100644 index 0000000..657482c --- /dev/null +++ b/lib/phrase/models/release_update_parameters1.rb @@ -0,0 +1,261 @@ +require 'date' + +module Phrase + class ReleaseUpdateParameters1 + # Cron schedule for the scheduler. Read more about the format of this field at https://en.wikipedia.org/wiki/Cron + attr_accessor :cron_schedule + + # Time zone for the scheduler + attr_accessor :time_zone + + # List of locale ids that will be included in the release. + attr_accessor :locale_ids + + # Only include tagged keys in the release. For a key to be included it must be tagged with all tags provided + attr_accessor :tags + + # Branch used for release + attr_accessor :branch + + # The created releases will be available only for apps with version greater or equal to this value + attr_accessor :app_min_version + + # The created releases will be available only for apps with version less or equal to this value + attr_accessor :app_max_version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cron_schedule' => :'cron_schedule', + :'time_zone' => :'time_zone', + :'locale_ids' => :'locale_ids', + :'tags' => :'tags', + :'branch' => :'branch', + :'app_min_version' => :'app_min_version', + :'app_max_version' => :'app_max_version' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'cron_schedule' => :'String', + :'time_zone' => :'String', + :'locale_ids' => :'Array', + :'tags' => :'Array', + :'branch' => :'String', + :'app_min_version' => :'String', + :'app_max_version' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::ReleaseUpdateParameters1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::ReleaseUpdateParameters1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'cron_schedule') + self.cron_schedule = attributes[:'cron_schedule'] + end + + if attributes.key?(:'time_zone') + self.time_zone = attributes[:'time_zone'] + end + + if attributes.key?(:'locale_ids') + if (value = attributes[:'locale_ids']).is_a?(Array) + self.locale_ids = value + end + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'branch') + self.branch = attributes[:'branch'] + end + + if attributes.key?(:'app_min_version') + self.app_min_version = attributes[:'app_min_version'] + end + + if attributes.key?(:'app_max_version') + self.app_max_version = attributes[:'app_max_version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cron_schedule == o.cron_schedule && + time_zone == o.time_zone && + locale_ids == o.locale_ids && + tags == o.tags && + branch == o.branch && + app_min_version == o.app_min_version && + app_max_version == o.app_max_version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cron_schedule, time_zone, locale_ids, tags, branch, app_min_version, app_max_version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :Time + Time.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Phrase.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/spec/api/release_triggers_api_spec.rb b/spec/api/release_triggers_api_spec.rb new file mode 100644 index 0000000..2f6a9ea --- /dev/null +++ b/spec/api/release_triggers_api_spec.rb @@ -0,0 +1,98 @@ +require 'spec_helper' +require 'json' + +# Unit tests for Phrase::ReleaseTriggersApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ReleaseTriggersApi' do + before do + # run before each test + @api_instance = Phrase::ReleaseTriggersApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ReleaseTriggersApi' do + it 'should create an instance of ReleaseTriggersApi' do + expect(@api_instance).to be_instance_of(Phrase::ReleaseTriggersApi) + end + end + + # unit tests for release_triggers_create + # Create a release trigger + # Create a new recurring release. New releases will be published automatically, based on the cron schedule provided. Currently, only one release trigger can exist per distribution. + # @param account_id Account ID + # @param distribution_id Distribution ID + # @param release_create_parameters1 + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [ReleaseTrigger] + describe 'release_triggers_create test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for release_triggers_destroy + # Delete a single release trigger + # Delete a single release trigger. + # @param account_id Account ID + # @param distribution_id Distribution ID + # @param id ID + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [nil] + describe 'release_triggers_destroy test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for release_triggers_list + # List release triggers + # List all release triggers for the given distribution.<br> Note: Currently only one release trigger can exist per distribution. + # @param account_id Account ID + # @param distribution_id Distribution ID + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [Array] + describe 'release_triggers_list test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for release_triggers_show + # Get a single release trigger + # Get details of a single release trigger. + # @param account_id Account ID + # @param distribution_id Distribution ID + # @param id ID + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [ReleaseTrigger] + describe 'release_triggers_show test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for release_triggers_update + # Update a release trigger + # Update a recurring release. + # @param account_id Account ID + # @param distribution_id Distribution ID + # @param id ID + # @param release_update_parameters1 + # @param [Hash] opts the optional parameters + # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) + # @return [ReleaseTrigger] + describe 'release_triggers_update test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/release_create_parameters1_spec.rb b/spec/models/release_create_parameters1_spec.rb new file mode 100644 index 0000000..aa10fa1 --- /dev/null +++ b/spec/models/release_create_parameters1_spec.rb @@ -0,0 +1,65 @@ +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Phrase::ReleaseCreateParameters1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ReleaseCreateParameters1' do + before do + # run before each test + @instance = Phrase::ReleaseCreateParameters1.new + end + + after do + # run after each test + end + + describe 'test an instance of ReleaseCreateParameters1' do + it 'should create an instance of ReleaseCreateParameters1' do + expect(@instance).to be_instance_of(Phrase::ReleaseCreateParameters1) + end + end + describe 'test attribute "cron_schedule"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "time_zone"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "locale_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "branch"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app_min_version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app_max_version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/release_trigger_spec.rb b/spec/models/release_trigger_spec.rb new file mode 100644 index 0000000..d9a539d --- /dev/null +++ b/spec/models/release_trigger_spec.rb @@ -0,0 +1,89 @@ +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Phrase::ReleaseTrigger +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ReleaseTrigger' do + before do + # run before each test + @instance = Phrase::ReleaseTrigger.new + end + + after do + # run after each test + end + + describe 'test an instance of ReleaseTrigger' do + it 'should create an instance of ReleaseTrigger' do + expect(@instance).to be_instance_of(Phrase::ReleaseTrigger) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "branch"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "cron_schedule"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "time_zone"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "next_run_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app_min_version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app_max_version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "locales"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/release_update_parameters1_spec.rb b/spec/models/release_update_parameters1_spec.rb new file mode 100644 index 0000000..4039df2 --- /dev/null +++ b/spec/models/release_update_parameters1_spec.rb @@ -0,0 +1,65 @@ +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Phrase::ReleaseUpdateParameters1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ReleaseUpdateParameters1' do + before do + # run before each test + @instance = Phrase::ReleaseUpdateParameters1.new + end + + after do + # run after each test + end + + describe 'test an instance of ReleaseUpdateParameters1' do + it 'should create an instance of ReleaseUpdateParameters1' do + expect(@instance).to be_instance_of(Phrase::ReleaseUpdateParameters1) + end + end + describe 'test attribute "cron_schedule"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "time_zone"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "locale_ids"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "branch"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app_min_version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app_max_version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end