phrase 4.35.0 → 4.37.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.
@@ -0,0 +1,225 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class Note
5
+ # Unique code identifying the note.
6
+ attr_accessor :id
7
+
8
+ # Markdown-formatted content of the note (max 65,535 characters).
9
+ attr_accessor :body
10
+
11
+ attr_accessor :created_at
12
+
13
+ attr_accessor :updated_at
14
+
15
+ # Attribute mapping from ruby-style variable name to JSON key.
16
+ def self.attribute_map
17
+ {
18
+ :'id' => :'id',
19
+ :'body' => :'body',
20
+ :'created_at' => :'created_at',
21
+ :'updated_at' => :'updated_at'
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.openapi_types
27
+ {
28
+ :'id' => :'String',
29
+ :'body' => :'String',
30
+ :'created_at' => :'DateTime',
31
+ :'updated_at' => :'DateTime'
32
+ }
33
+ end
34
+
35
+ # List of attributes with nullable: true
36
+ def self.openapi_nullable
37
+ Set.new([
38
+ ])
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ if (!attributes.is_a?(Hash))
45
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::Note` initialize method"
46
+ end
47
+
48
+ # check to see if the attribute exists and convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h|
50
+ if (!self.class.attribute_map.key?(k.to_sym))
51
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::Note`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
52
+ end
53
+ h[k.to_sym] = v
54
+ }
55
+
56
+ if attributes.key?(:'id')
57
+ self.id = attributes[:'id']
58
+ end
59
+
60
+ if attributes.key?(:'body')
61
+ self.body = attributes[:'body']
62
+ end
63
+
64
+ if attributes.key?(:'created_at')
65
+ self.created_at = attributes[:'created_at']
66
+ end
67
+
68
+ if attributes.key?(:'updated_at')
69
+ self.updated_at = attributes[:'updated_at']
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
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ id == o.id &&
92
+ body == o.body &&
93
+ created_at == o.created_at &&
94
+ updated_at == o.updated_at
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [id, body, created_at, updated_at].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.openapi_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :Time
147
+ Time.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :Boolean
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ Phrase.const_get(type).build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ if value.nil?
198
+ is_nullable = self.class.openapi_nullable.include?(attr)
199
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
+ end
201
+
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+ end
225
+ end
@@ -70,6 +70,8 @@ module Phrase
70
70
 
71
71
  attr_accessor :branch
72
72
 
73
+ attr_accessor :note
74
+
73
75
  class EnumAttributeValidator
74
76
  attr_reader :datatype
75
77
  attr_reader :allowable_values
@@ -128,7 +130,8 @@ module Phrase
128
130
  :'translation_keys_sort_collation' => :'translation_keys_sort_collation',
129
131
  :'job_locking_enabled' => :'job_locking_enabled',
130
132
  :'placeholder_styles' => :'placeholder_styles',
131
- :'branch' => :'branch'
133
+ :'branch' => :'branch',
134
+ :'note' => :'note'
132
135
  }
133
136
  end
134
137
 
@@ -168,7 +171,8 @@ module Phrase
168
171
  :'translation_keys_sort_collation' => :'String',
169
172
  :'job_locking_enabled' => :'Boolean',
170
173
  :'placeholder_styles' => :'Array<String>',
171
- :'branch' => :'Branch'
174
+ :'branch' => :'Branch',
175
+ :'note' => :'Note'
172
176
  }
173
177
  end
174
178
 
@@ -337,6 +341,10 @@ module Phrase
337
341
  if attributes.key?(:'branch')
338
342
  self.branch = attributes[:'branch']
339
343
  end
344
+
345
+ if attributes.key?(:'note')
346
+ self.note = attributes[:'note']
347
+ end
340
348
  end
341
349
 
342
350
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -402,7 +410,8 @@ module Phrase
402
410
  translation_keys_sort_collation == o.translation_keys_sort_collation &&
403
411
  job_locking_enabled == o.job_locking_enabled &&
404
412
  placeholder_styles == o.placeholder_styles &&
405
- branch == o.branch
413
+ branch == o.branch &&
414
+ note == o.note
406
415
  end
407
416
 
408
417
  # @see the `==` method
@@ -414,7 +423,7 @@ module Phrase
414
423
  # Calculates hash code according to all attributes.
415
424
  # @return [Integer] Hash code
416
425
  def hash
417
- [id, name, slug, main_format, project_image_url, media, account, space, point_of_contact, created_at, updated_at, shares_translation_memory, machine_translation_enabled, zero_plural_form_enabled, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, enable_branching, protect_master_branch, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, autotranslate_overwrite_unverified_translations, fallback_for_unverified_translations, autocomplete_job_enabled, default_encoding, cldr_version, translation_keys_sort_collation, job_locking_enabled, placeholder_styles, branch].hash
426
+ [id, name, slug, main_format, project_image_url, media, account, space, point_of_contact, created_at, updated_at, shares_translation_memory, machine_translation_enabled, zero_plural_form_enabled, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, enable_branching, protect_master_branch, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, autotranslate_overwrite_unverified_translations, fallback_for_unverified_translations, autocomplete_job_enabled, default_encoding, cldr_version, translation_keys_sort_collation, job_locking_enabled, placeholder_styles, branch, note].hash
418
427
  end
419
428
 
420
429
  # Builds the object from hash
@@ -0,0 +1,202 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class ProjectNoteUpdateParameters
5
+ # Markdown content for the project note (max 65,535 characters).
6
+ attr_accessor :body
7
+
8
+ # Attribute mapping from ruby-style variable name to JSON key.
9
+ def self.attribute_map
10
+ {
11
+ :'body' => :'body'
12
+ }
13
+ end
14
+
15
+ # Attribute type mapping.
16
+ def self.openapi_types
17
+ {
18
+ :'body' => :'String'
19
+ }
20
+ end
21
+
22
+ # List of attributes with nullable: true
23
+ def self.openapi_nullable
24
+ Set.new([
25
+ ])
26
+ end
27
+
28
+ # Initializes the object
29
+ # @param [Hash] attributes Model attributes in the form of hash
30
+ def initialize(attributes = {})
31
+ if (!attributes.is_a?(Hash))
32
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::ProjectNoteUpdateParameters` initialize method"
33
+ end
34
+
35
+ # check to see if the attribute exists and convert string to symbol for hash key
36
+ attributes = attributes.each_with_object({}) { |(k, v), h|
37
+ if (!self.class.attribute_map.key?(k.to_sym))
38
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::ProjectNoteUpdateParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
39
+ end
40
+ h[k.to_sym] = v
41
+ }
42
+
43
+ if attributes.key?(:'body')
44
+ self.body = attributes[:'body']
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ if @body.nil?
53
+ invalid_properties.push('invalid value for "body", body cannot be nil.')
54
+ end
55
+
56
+ invalid_properties
57
+ end
58
+
59
+ # Check to see if the all the properties in the model are valid
60
+ # @return true if the model is valid
61
+ def valid?
62
+ return false if @body.nil?
63
+ true
64
+ end
65
+
66
+ # Checks equality by comparing each attribute.
67
+ # @param [Object] Object to be compared
68
+ def ==(o)
69
+ return true if self.equal?(o)
70
+ self.class == o.class &&
71
+ body == o.body
72
+ end
73
+
74
+ # @see the `==` method
75
+ # @param [Object] Object to be compared
76
+ def eql?(o)
77
+ self == o
78
+ end
79
+
80
+ # Calculates hash code according to all attributes.
81
+ # @return [Integer] Hash code
82
+ def hash
83
+ [body].hash
84
+ end
85
+
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def self.build_from_hash(attributes)
90
+ new.build_from_hash(attributes)
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ self.class.openapi_types.each_pair do |key, type|
99
+ if type =~ /\AArray<(.*)>/i
100
+ # check to ensure the input is an array given that the attribute
101
+ # is documented as an array but the input is not
102
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
107
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+
113
+ # Deserializes the data based on type
114
+ # @param string type Data type
115
+ # @param string value Value to be deserialized
116
+ # @return [Object] Deserialized data
117
+ def _deserialize(type, value)
118
+ case type.to_sym
119
+ when :DateTime
120
+ DateTime.parse(value)
121
+ when :Date
122
+ Date.parse(value)
123
+ when :Time
124
+ Time.parse(value)
125
+ when :String
126
+ value.to_s
127
+ when :Integer
128
+ value.to_i
129
+ when :Float
130
+ value.to_f
131
+ when :Boolean
132
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
133
+ true
134
+ else
135
+ false
136
+ end
137
+ when :Object
138
+ # generic object (usually a Hash), return directly
139
+ value
140
+ when /\AArray<(?<inner_type>.+)>\z/
141
+ inner_type = Regexp.last_match[:inner_type]
142
+ value.map { |v| _deserialize(inner_type, v) }
143
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
144
+ k_type = Regexp.last_match[:k_type]
145
+ v_type = Regexp.last_match[:v_type]
146
+ {}.tap do |hash|
147
+ value.each do |k, v|
148
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
149
+ end
150
+ end
151
+ else # model
152
+ Phrase.const_get(type).build_from_hash(value)
153
+ end
154
+ end
155
+
156
+ # Returns the string representation of the object
157
+ # @return [String] String presentation of the object
158
+ def to_s
159
+ to_hash.to_s
160
+ end
161
+
162
+ # to_body is an alias to to_hash (backward compatibility)
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_body
165
+ to_hash
166
+ end
167
+
168
+ # Returns the object in the form of hash
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_hash
171
+ hash = {}
172
+ self.class.attribute_map.each_pair do |attr, param|
173
+ value = self.send(attr)
174
+ if value.nil?
175
+ is_nullable = self.class.openapi_nullable.include?(attr)
176
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
177
+ end
178
+
179
+ hash[param] = _to_hash(value)
180
+ end
181
+ hash
182
+ end
183
+
184
+ # Outputs non-array value in the form of hash
185
+ # For object, use to_hash. Otherwise, just return the value
186
+ # @param [Object] value Any valid value
187
+ # @return [Hash] Returns the value in the form of hash
188
+ def _to_hash(value)
189
+ if value.is_a?(Array)
190
+ value.compact.map { |v| _to_hash(v) }
191
+ elsif value.is_a?(Hash)
192
+ {}.tap do |hash|
193
+ value.each { |k, v| hash[k] = _to_hash(v) }
194
+ end
195
+ elsif value.respond_to? :to_hash
196
+ value.to_hash
197
+ else
198
+ value
199
+ end
200
+ end
201
+ end
202
+ end
@@ -10,10 +10,13 @@ module Phrase
10
10
 
11
11
  attr_accessor :status
12
12
 
13
+ # When `true`, the sync was triggered automatically (for example by a Zero Touch Localization rule or an automation). When `false`, it was triggered manually.
14
+ attr_accessor :automatic
15
+
13
16
  # URL of the pull request created on export
14
17
  attr_accessor :pull_request_url
15
18
 
16
- # Whether the import was triggered by the repo push event
19
+ # **Deprecated.** Use `automatic` instead. Only present on import events. Indicates whether the import was triggered automatically.
17
20
  attr_accessor :auto_import
18
21
 
19
22
  # List of error messages, in case of failure
@@ -51,6 +54,7 @@ module Phrase
51
54
  :'type' => :'type',
52
55
  :'created_at' => :'created_at',
53
56
  :'status' => :'status',
57
+ :'automatic' => :'automatic',
54
58
  :'pull_request_url' => :'pull_request_url',
55
59
  :'auto_import' => :'auto_import',
56
60
  :'errors' => :'errors',
@@ -65,6 +69,7 @@ module Phrase
65
69
  :'type' => :'String',
66
70
  :'created_at' => :'DateTime',
67
71
  :'status' => :'String',
72
+ :'automatic' => :'Boolean',
68
73
  :'pull_request_url' => :'String',
69
74
  :'auto_import' => :'Boolean',
70
75
  :'errors' => :'Array<String>',
@@ -110,6 +115,10 @@ module Phrase
110
115
  self.status = attributes[:'status']
111
116
  end
112
117
 
118
+ if attributes.key?(:'automatic')
119
+ self.automatic = attributes[:'automatic']
120
+ end
121
+
113
122
  if attributes.key?(:'pull_request_url')
114
123
  self.pull_request_url = attributes[:'pull_request_url']
115
124
  end
@@ -177,6 +186,7 @@ module Phrase
177
186
  type == o.type &&
178
187
  created_at == o.created_at &&
179
188
  status == o.status &&
189
+ automatic == o.automatic &&
180
190
  pull_request_url == o.pull_request_url &&
181
191
  auto_import == o.auto_import &&
182
192
  errors == o.errors &&
@@ -192,7 +202,7 @@ module Phrase
192
202
  # Calculates hash code according to all attributes.
193
203
  # @return [Integer] Hash code
194
204
  def hash
195
- [id, type, created_at, status, pull_request_url, auto_import, errors, uploads].hash
205
+ [id, type, created_at, status, automatic, pull_request_url, auto_import, errors, uploads].hash
196
206
  end
197
207
 
198
208
  # Builds the object from hash
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '4.35.0'
2
+ VERSION = '4.37.0'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -144,6 +144,7 @@ require 'phrase/models/member_project_detail_project_roles_inner'
144
144
  require 'phrase/models/member_spaces_inner'
145
145
  require 'phrase/models/member_update_parameters'
146
146
  require 'phrase/models/member_update_settings_parameters'
147
+ require 'phrase/models/note'
147
148
  require 'phrase/models/notification'
148
149
  require 'phrase/models/notification_group'
149
150
  require 'phrase/models/notification_group_detail'
@@ -162,6 +163,7 @@ require 'phrase/models/project_create_parameters'
162
163
  require 'phrase/models/project_details'
163
164
  require 'phrase/models/project_locales'
164
165
  require 'phrase/models/project_member'
166
+ require 'phrase/models/project_note_update_parameters'
165
167
  require 'phrase/models/project_report'
166
168
  require 'phrase/models/project_short'
167
169
  require 'phrase/models/project_update_parameters'
@@ -300,6 +302,7 @@ require 'phrase/api/orders_api'
300
302
  require 'phrase/api/organization_job_template_locales_api'
301
303
  require 'phrase/api/organization_job_templates_api'
302
304
  require 'phrase/api/pre_translations_api'
305
+ require 'phrase/api/project_notes_api'
303
306
  require 'phrase/api/projects_api'
304
307
  require 'phrase/api/quality_performance_score_api'
305
308
  require 'phrase/api/release_triggers_api'
@@ -0,0 +1,66 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::ProjectNotesApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'ProjectNotesApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::ProjectNotesApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of ProjectNotesApi' do
18
+ it 'should create an instance of ProjectNotesApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::ProjectNotesApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for project_note_destroy
24
+ # Delete a project note
25
+ # Deletes the note associated with a project. This operation is idempotent — it succeeds silently even when no note exists. The note is resolved against the main project — branch projects delete the main project&#39;s note. Requires manage permissions on the project and the &#x60;write&#x60; OAuth scope.
26
+ # @param project_id Project ID
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
29
+ # @option opts [String] :branch Branch to use
30
+ # @return [nil]
31
+ describe 'project_note_destroy test' do
32
+ it 'should work' do
33
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
34
+ end
35
+ end
36
+
37
+ # unit tests for project_note_show
38
+ # Get a project note
39
+ # Returns the Markdown-formatted note attached to a project. The note is resolved against the main project — branch projects return the main project&#39;s note. Returns 404 when no note has been created yet. Requires the &#x60;read&#x60; OAuth scope.
40
+ # @param project_id Project ID
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
43
+ # @option opts [String] :branch Branch to use
44
+ # @return [Note]
45
+ describe 'project_note_show test' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ end
49
+ end
50
+
51
+ # unit tests for project_note_update
52
+ # Create or update a project note
53
+ # Creates or updates the Markdown-formatted note for a project. If a note already exists it is updated in place; otherwise a new note is created. The note is stored on the main project — branch projects write to the main project&#39;s note. &#x60;body&#x60; is required. Requires manage permissions on the project and the &#x60;write&#x60; OAuth scope.
54
+ # @param project_id Project ID
55
+ # @param project_note_update_parameters
56
+ # @param [Hash] opts the optional parameters
57
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
58
+ # @option opts [String] :branch Branch to use
59
+ # @return [Note]
60
+ describe 'project_note_update test' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
+ end
64
+ end
65
+
66
+ end
@@ -0,0 +1,47 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::Note
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'Note' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::Note.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of Note' do
19
+ it 'should create an instance of Note' do
20
+ expect(@instance).to be_instance_of(Phrase::Note)
21
+ end
22
+ end
23
+ describe 'test attribute "id"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "body"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "created_at"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "updated_at"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end