dyspatch_client 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +23 -27
  3. data/docs/LocalizationsApi.md +9 -6
  4. data/docs/TemplatesApi.md +16 -14
  5. data/dyspatch_client.gemspec +4 -4
  6. data/lib/dyspatch_client.rb +2 -12
  7. data/lib/dyspatch_client/api/localizations_api.rb +14 -12
  8. data/lib/dyspatch_client/api/templates_api.rb +23 -25
  9. data/lib/dyspatch_client/api_client.rb +2 -2
  10. data/lib/dyspatch_client/api_error.rb +2 -2
  11. data/lib/dyspatch_client/configuration.rb +2 -2
  12. data/lib/dyspatch_client/models/api_error.rb +2 -2
  13. data/lib/dyspatch_client/models/compiled_read.rb +2 -2
  14. data/lib/dyspatch_client/models/cursor.rb +2 -2
  15. data/lib/dyspatch_client/models/localization_meta_read.rb +2 -2
  16. data/lib/dyspatch_client/models/localization_read.rb +2 -2
  17. data/lib/dyspatch_client/models/template_meta_read.rb +2 -2
  18. data/lib/dyspatch_client/models/template_read.rb +2 -2
  19. data/lib/dyspatch_client/models/templates_read.rb +2 -2
  20. data/lib/dyspatch_client/version.rb +3 -3
  21. data/spec/api/localizations_api_spec.rb +4 -3
  22. data/spec/api/templates_api_spec.rb +6 -5
  23. data/spec/api_client_spec.rb +2 -2
  24. data/spec/configuration_spec.rb +2 -2
  25. data/spec/models/api_error_spec.rb +2 -2
  26. data/spec/models/compiled_read_spec.rb +2 -2
  27. data/spec/models/cursor_spec.rb +2 -2
  28. data/spec/models/localization_meta_read_spec.rb +2 -2
  29. data/spec/models/localization_read_spec.rb +2 -2
  30. data/spec/models/template_meta_read_spec.rb +2 -2
  31. data/spec/models/template_read_spec.rb +2 -2
  32. data/spec/models/templates_read_spec.rb +2 -2
  33. data/spec/spec_helper.rb +2 -2
  34. metadata +21 -60
  35. data/docs/CreatedAt.md +0 -7
  36. data/docs/LanguageId.md +0 -7
  37. data/docs/LocalizationId.md +0 -7
  38. data/docs/LocalizationName.md +0 -7
  39. data/docs/LocalizationUrl.md +0 -7
  40. data/docs/TemplateDescription.md +0 -7
  41. data/docs/TemplateId.md +0 -7
  42. data/docs/TemplateName.md +0 -7
  43. data/docs/TemplateUrl.md +0 -7
  44. data/docs/UpdatedAt.md +0 -7
  45. data/lib/dyspatch_client/models/created_at.rb +0 -179
  46. data/lib/dyspatch_client/models/language_id.rb +0 -179
  47. data/lib/dyspatch_client/models/localization_id.rb +0 -179
  48. data/lib/dyspatch_client/models/localization_name.rb +0 -179
  49. data/lib/dyspatch_client/models/localization_url.rb +0 -179
  50. data/lib/dyspatch_client/models/template_description.rb +0 -179
  51. data/lib/dyspatch_client/models/template_id.rb +0 -179
  52. data/lib/dyspatch_client/models/template_name.rb +0 -179
  53. data/lib/dyspatch_client/models/template_url.rb +0 -179
  54. data/lib/dyspatch_client/models/updated_at.rb +0 -179
  55. data/spec/models/created_at_spec.rb +0 -36
  56. data/spec/models/language_id_spec.rb +0 -36
  57. data/spec/models/localization_id_spec.rb +0 -36
  58. data/spec/models/localization_name_spec.rb +0 -36
  59. data/spec/models/localization_url_spec.rb +0 -36
  60. data/spec/models/template_description_spec.rb +0 -36
  61. data/spec/models/template_id_spec.rb +0 -36
  62. data/spec/models/template_name_spec.rb +0 -36
  63. data/spec/models/template_url_spec.rb +0 -36
  64. data/spec/models/updated_at_spec.rb +0 -36
@@ -1,179 +0,0 @@
1
- =begin
2
- #Dyspatch API
3
-
4
- ## Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on how to implement Dyspatch. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python)
5
-
6
- OpenAPI spec version: 2018.08
7
- Contact: support@dyspatch.io
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module DyspatchClient
16
- # The user-specified name of a localization
17
- class LocalizationName
18
-
19
- # Attribute mapping from ruby-style variable name to JSON key.
20
- def self.attribute_map
21
- {
22
- }
23
- end
24
-
25
- # Attribute type mapping.
26
- def self.swagger_types
27
- {
28
- }
29
- end
30
-
31
- # Initializes the object
32
- # @param [Hash] attributes Model attributes in the form of hash
33
- def initialize(attributes = {})
34
- return unless attributes.is_a?(Hash)
35
-
36
- # convert string to symbol for hash key
37
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
38
-
39
- end
40
-
41
- # Show invalid properties with the reasons. Usually used together with valid?
42
- # @return Array for valid properties with the reasons
43
- def list_invalid_properties
44
- invalid_properties = Array.new
45
- return invalid_properties
46
- end
47
-
48
- # Check to see if the all the properties in the model are valid
49
- # @return true if the model is valid
50
- def valid?
51
- return true
52
- end
53
-
54
- # Checks equality by comparing each attribute.
55
- # @param [Object] Object to be compared
56
- def ==(o)
57
- return true if self.equal?(o)
58
- self.class == o.class
59
- end
60
-
61
- # @see the `==` method
62
- # @param [Object] Object to be compared
63
- def eql?(o)
64
- self == o
65
- end
66
-
67
- # Calculates hash code according to all attributes.
68
- # @return [Fixnum] Hash code
69
- def hash
70
- [].hash
71
- end
72
-
73
- # Builds the object from hash
74
- # @param [Hash] attributes Model attributes in the form of hash
75
- # @return [Object] Returns the model itself
76
- def build_from_hash(attributes)
77
- return nil unless attributes.is_a?(Hash)
78
- self.class.swagger_types.each_pair do |key, type|
79
- if type =~ /\AArray<(.*)>/i
80
- # check to ensure the input is an array given that the the attribute
81
- # is documented as an array but the input is not
82
- if attributes[self.class.attribute_map[key]].is_a?(Array)
83
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
84
- end
85
- elsif !attributes[self.class.attribute_map[key]].nil?
86
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
87
- end # or else data not found in attributes(hash), not an issue as the data can be optional
88
- end
89
-
90
- self
91
- end
92
-
93
- # Deserializes the data based on type
94
- # @param string type Data type
95
- # @param string value Value to be deserialized
96
- # @return [Object] Deserialized data
97
- def _deserialize(type, value)
98
- case type.to_sym
99
- when :DateTime
100
- DateTime.parse(value)
101
- when :Date
102
- Date.parse(value)
103
- when :String
104
- value.to_s
105
- when :Integer
106
- value.to_i
107
- when :Float
108
- value.to_f
109
- when :BOOLEAN
110
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
111
- true
112
- else
113
- false
114
- end
115
- when :Object
116
- # generic object (usually a Hash), return directly
117
- value
118
- when /\AArray<(?<inner_type>.+)>\z/
119
- inner_type = Regexp.last_match[:inner_type]
120
- value.map { |v| _deserialize(inner_type, v) }
121
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
122
- k_type = Regexp.last_match[:k_type]
123
- v_type = Regexp.last_match[:v_type]
124
- {}.tap do |hash|
125
- value.each do |k, v|
126
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
127
- end
128
- end
129
- else # model
130
- temp_model = DyspatchClient.const_get(type).new
131
- temp_model.build_from_hash(value)
132
- end
133
- end
134
-
135
- # Returns the string representation of the object
136
- # @return [String] String presentation of the object
137
- def to_s
138
- to_hash.to_s
139
- end
140
-
141
- # to_body is an alias to to_hash (backward compatibility)
142
- # @return [Hash] Returns the object in the form of hash
143
- def to_body
144
- to_hash
145
- end
146
-
147
- # Returns the object in the form of hash
148
- # @return [Hash] Returns the object in the form of hash
149
- def to_hash
150
- hash = {}
151
- self.class.attribute_map.each_pair do |attr, param|
152
- value = self.send(attr)
153
- next if value.nil?
154
- hash[param] = _to_hash(value)
155
- end
156
- hash
157
- end
158
-
159
- # Outputs non-array value in the form of hash
160
- # For object, use to_hash. Otherwise, just return the value
161
- # @param [Object] value Any valid value
162
- # @return [Hash] Returns the value in the form of hash
163
- def _to_hash(value)
164
- if value.is_a?(Array)
165
- value.compact.map{ |v| _to_hash(v) }
166
- elsif value.is_a?(Hash)
167
- {}.tap do |hash|
168
- value.each { |k, v| hash[k] = _to_hash(v) }
169
- end
170
- elsif value.respond_to? :to_hash
171
- value.to_hash
172
- else
173
- value
174
- end
175
- end
176
-
177
- end
178
-
179
- end
@@ -1,179 +0,0 @@
1
- =begin
2
- #Dyspatch API
3
-
4
- ## Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on how to implement Dyspatch. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python)
5
-
6
- OpenAPI spec version: 2018.08
7
- Contact: support@dyspatch.io
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module DyspatchClient
16
- # The API url for a specific localization
17
- class LocalizationUrl
18
-
19
- # Attribute mapping from ruby-style variable name to JSON key.
20
- def self.attribute_map
21
- {
22
- }
23
- end
24
-
25
- # Attribute type mapping.
26
- def self.swagger_types
27
- {
28
- }
29
- end
30
-
31
- # Initializes the object
32
- # @param [Hash] attributes Model attributes in the form of hash
33
- def initialize(attributes = {})
34
- return unless attributes.is_a?(Hash)
35
-
36
- # convert string to symbol for hash key
37
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
38
-
39
- end
40
-
41
- # Show invalid properties with the reasons. Usually used together with valid?
42
- # @return Array for valid properties with the reasons
43
- def list_invalid_properties
44
- invalid_properties = Array.new
45
- return invalid_properties
46
- end
47
-
48
- # Check to see if the all the properties in the model are valid
49
- # @return true if the model is valid
50
- def valid?
51
- return true
52
- end
53
-
54
- # Checks equality by comparing each attribute.
55
- # @param [Object] Object to be compared
56
- def ==(o)
57
- return true if self.equal?(o)
58
- self.class == o.class
59
- end
60
-
61
- # @see the `==` method
62
- # @param [Object] Object to be compared
63
- def eql?(o)
64
- self == o
65
- end
66
-
67
- # Calculates hash code according to all attributes.
68
- # @return [Fixnum] Hash code
69
- def hash
70
- [].hash
71
- end
72
-
73
- # Builds the object from hash
74
- # @param [Hash] attributes Model attributes in the form of hash
75
- # @return [Object] Returns the model itself
76
- def build_from_hash(attributes)
77
- return nil unless attributes.is_a?(Hash)
78
- self.class.swagger_types.each_pair do |key, type|
79
- if type =~ /\AArray<(.*)>/i
80
- # check to ensure the input is an array given that the the attribute
81
- # is documented as an array but the input is not
82
- if attributes[self.class.attribute_map[key]].is_a?(Array)
83
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
84
- end
85
- elsif !attributes[self.class.attribute_map[key]].nil?
86
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
87
- end # or else data not found in attributes(hash), not an issue as the data can be optional
88
- end
89
-
90
- self
91
- end
92
-
93
- # Deserializes the data based on type
94
- # @param string type Data type
95
- # @param string value Value to be deserialized
96
- # @return [Object] Deserialized data
97
- def _deserialize(type, value)
98
- case type.to_sym
99
- when :DateTime
100
- DateTime.parse(value)
101
- when :Date
102
- Date.parse(value)
103
- when :String
104
- value.to_s
105
- when :Integer
106
- value.to_i
107
- when :Float
108
- value.to_f
109
- when :BOOLEAN
110
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
111
- true
112
- else
113
- false
114
- end
115
- when :Object
116
- # generic object (usually a Hash), return directly
117
- value
118
- when /\AArray<(?<inner_type>.+)>\z/
119
- inner_type = Regexp.last_match[:inner_type]
120
- value.map { |v| _deserialize(inner_type, v) }
121
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
122
- k_type = Regexp.last_match[:k_type]
123
- v_type = Regexp.last_match[:v_type]
124
- {}.tap do |hash|
125
- value.each do |k, v|
126
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
127
- end
128
- end
129
- else # model
130
- temp_model = DyspatchClient.const_get(type).new
131
- temp_model.build_from_hash(value)
132
- end
133
- end
134
-
135
- # Returns the string representation of the object
136
- # @return [String] String presentation of the object
137
- def to_s
138
- to_hash.to_s
139
- end
140
-
141
- # to_body is an alias to to_hash (backward compatibility)
142
- # @return [Hash] Returns the object in the form of hash
143
- def to_body
144
- to_hash
145
- end
146
-
147
- # Returns the object in the form of hash
148
- # @return [Hash] Returns the object in the form of hash
149
- def to_hash
150
- hash = {}
151
- self.class.attribute_map.each_pair do |attr, param|
152
- value = self.send(attr)
153
- next if value.nil?
154
- hash[param] = _to_hash(value)
155
- end
156
- hash
157
- end
158
-
159
- # Outputs non-array value in the form of hash
160
- # For object, use to_hash. Otherwise, just return the value
161
- # @param [Object] value Any valid value
162
- # @return [Hash] Returns the value in the form of hash
163
- def _to_hash(value)
164
- if value.is_a?(Array)
165
- value.compact.map{ |v| _to_hash(v) }
166
- elsif value.is_a?(Hash)
167
- {}.tap do |hash|
168
- value.each { |k, v| hash[k] = _to_hash(v) }
169
- end
170
- elsif value.respond_to? :to_hash
171
- value.to_hash
172
- else
173
- value
174
- end
175
- end
176
-
177
- end
178
-
179
- end
@@ -1,179 +0,0 @@
1
- =begin
2
- #Dyspatch API
3
-
4
- ## Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on how to implement Dyspatch. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python)
5
-
6
- OpenAPI spec version: 2018.08
7
- Contact: support@dyspatch.io
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module DyspatchClient
16
- # A description of the template
17
- class TemplateDescription
18
-
19
- # Attribute mapping from ruby-style variable name to JSON key.
20
- def self.attribute_map
21
- {
22
- }
23
- end
24
-
25
- # Attribute type mapping.
26
- def self.swagger_types
27
- {
28
- }
29
- end
30
-
31
- # Initializes the object
32
- # @param [Hash] attributes Model attributes in the form of hash
33
- def initialize(attributes = {})
34
- return unless attributes.is_a?(Hash)
35
-
36
- # convert string to symbol for hash key
37
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
38
-
39
- end
40
-
41
- # Show invalid properties with the reasons. Usually used together with valid?
42
- # @return Array for valid properties with the reasons
43
- def list_invalid_properties
44
- invalid_properties = Array.new
45
- return invalid_properties
46
- end
47
-
48
- # Check to see if the all the properties in the model are valid
49
- # @return true if the model is valid
50
- def valid?
51
- return true
52
- end
53
-
54
- # Checks equality by comparing each attribute.
55
- # @param [Object] Object to be compared
56
- def ==(o)
57
- return true if self.equal?(o)
58
- self.class == o.class
59
- end
60
-
61
- # @see the `==` method
62
- # @param [Object] Object to be compared
63
- def eql?(o)
64
- self == o
65
- end
66
-
67
- # Calculates hash code according to all attributes.
68
- # @return [Fixnum] Hash code
69
- def hash
70
- [].hash
71
- end
72
-
73
- # Builds the object from hash
74
- # @param [Hash] attributes Model attributes in the form of hash
75
- # @return [Object] Returns the model itself
76
- def build_from_hash(attributes)
77
- return nil unless attributes.is_a?(Hash)
78
- self.class.swagger_types.each_pair do |key, type|
79
- if type =~ /\AArray<(.*)>/i
80
- # check to ensure the input is an array given that the the attribute
81
- # is documented as an array but the input is not
82
- if attributes[self.class.attribute_map[key]].is_a?(Array)
83
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
84
- end
85
- elsif !attributes[self.class.attribute_map[key]].nil?
86
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
87
- end # or else data not found in attributes(hash), not an issue as the data can be optional
88
- end
89
-
90
- self
91
- end
92
-
93
- # Deserializes the data based on type
94
- # @param string type Data type
95
- # @param string value Value to be deserialized
96
- # @return [Object] Deserialized data
97
- def _deserialize(type, value)
98
- case type.to_sym
99
- when :DateTime
100
- DateTime.parse(value)
101
- when :Date
102
- Date.parse(value)
103
- when :String
104
- value.to_s
105
- when :Integer
106
- value.to_i
107
- when :Float
108
- value.to_f
109
- when :BOOLEAN
110
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
111
- true
112
- else
113
- false
114
- end
115
- when :Object
116
- # generic object (usually a Hash), return directly
117
- value
118
- when /\AArray<(?<inner_type>.+)>\z/
119
- inner_type = Regexp.last_match[:inner_type]
120
- value.map { |v| _deserialize(inner_type, v) }
121
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
122
- k_type = Regexp.last_match[:k_type]
123
- v_type = Regexp.last_match[:v_type]
124
- {}.tap do |hash|
125
- value.each do |k, v|
126
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
127
- end
128
- end
129
- else # model
130
- temp_model = DyspatchClient.const_get(type).new
131
- temp_model.build_from_hash(value)
132
- end
133
- end
134
-
135
- # Returns the string representation of the object
136
- # @return [String] String presentation of the object
137
- def to_s
138
- to_hash.to_s
139
- end
140
-
141
- # to_body is an alias to to_hash (backward compatibility)
142
- # @return [Hash] Returns the object in the form of hash
143
- def to_body
144
- to_hash
145
- end
146
-
147
- # Returns the object in the form of hash
148
- # @return [Hash] Returns the object in the form of hash
149
- def to_hash
150
- hash = {}
151
- self.class.attribute_map.each_pair do |attr, param|
152
- value = self.send(attr)
153
- next if value.nil?
154
- hash[param] = _to_hash(value)
155
- end
156
- hash
157
- end
158
-
159
- # Outputs non-array value in the form of hash
160
- # For object, use to_hash. Otherwise, just return the value
161
- # @param [Object] value Any valid value
162
- # @return [Hash] Returns the value in the form of hash
163
- def _to_hash(value)
164
- if value.is_a?(Array)
165
- value.compact.map{ |v| _to_hash(v) }
166
- elsif value.is_a?(Hash)
167
- {}.tap do |hash|
168
- value.each { |k, v| hash[k] = _to_hash(v) }
169
- end
170
- elsif value.respond_to? :to_hash
171
- value.to_hash
172
- else
173
- value
174
- end
175
- end
176
-
177
- end
178
-
179
- end