moonlogs-ruby 1.0.4 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -5
  3. data/docs/DefaultApi.md +48 -0
  4. data/docs/InlineResponse20014.md +11 -0
  5. data/lib/moonlogs-ruby/api/default_api.rb +51 -1
  6. data/lib/moonlogs-ruby/api_client.rb +1 -1
  7. data/lib/moonlogs-ruby/api_error.rb +1 -1
  8. data/lib/moonlogs-ruby/configuration.rb +1 -1
  9. data/lib/moonlogs-ruby/models/api_token_request.rb +1 -1
  10. data/lib/moonlogs-ruby/models/api_token_response.rb +1 -1
  11. data/lib/moonlogs-ruby/models/credentials.rb +1 -1
  12. data/lib/moonlogs-ruby/models/inline_response_200.rb +1 -1
  13. data/lib/moonlogs-ruby/models/inline_response_200_1.rb +1 -1
  14. data/lib/moonlogs-ruby/models/inline_response_200_10.rb +1 -1
  15. data/lib/moonlogs-ruby/models/inline_response_200_11.rb +1 -1
  16. data/lib/moonlogs-ruby/models/inline_response_200_12.rb +1 -1
  17. data/lib/moonlogs-ruby/models/inline_response_200_13.rb +1 -1
  18. data/lib/moonlogs-ruby/models/inline_response_200_14.rb +267 -0
  19. data/lib/moonlogs-ruby/models/inline_response_200_2.rb +1 -1
  20. data/lib/moonlogs-ruby/models/inline_response_200_3.rb +1 -1
  21. data/lib/moonlogs-ruby/models/inline_response_200_4.rb +1 -1
  22. data/lib/moonlogs-ruby/models/inline_response_200_5.rb +1 -1
  23. data/lib/moonlogs-ruby/models/inline_response_200_6.rb +1 -1
  24. data/lib/moonlogs-ruby/models/inline_response_200_7.rb +1 -1
  25. data/lib/moonlogs-ruby/models/inline_response_200_8.rb +1 -1
  26. data/lib/moonlogs-ruby/models/inline_response_200_9.rb +1 -1
  27. data/lib/moonlogs-ruby/models/level.rb +1 -1
  28. data/lib/moonlogs-ruby/models/meta.rb +1 -1
  29. data/lib/moonlogs-ruby/models/one_of_record_request_level.rb +1 -1
  30. data/lib/moonlogs-ruby/models/one_of_record_response_level.rb +1 -1
  31. data/lib/moonlogs-ruby/models/one_of_user_request_role.rb +1 -1
  32. data/lib/moonlogs-ruby/models/one_of_user_response_role.rb +1 -1
  33. data/lib/moonlogs-ruby/models/record_request.rb +1 -1
  34. data/lib/moonlogs-ruby/models/record_response.rb +1 -1
  35. data/lib/moonlogs-ruby/models/role.rb +1 -1
  36. data/lib/moonlogs-ruby/models/schema_field.rb +1 -1
  37. data/lib/moonlogs-ruby/models/schema_kind.rb +1 -1
  38. data/lib/moonlogs-ruby/models/schema_request.rb +1 -1
  39. data/lib/moonlogs-ruby/models/schema_response.rb +1 -1
  40. data/lib/moonlogs-ruby/models/session.rb +1 -1
  41. data/lib/moonlogs-ruby/models/tag_request.rb +1 -1
  42. data/lib/moonlogs-ruby/models/tag_response.rb +1 -1
  43. data/lib/moonlogs-ruby/models/user_request.rb +1 -1
  44. data/lib/moonlogs-ruby/models/user_response.rb +1 -1
  45. data/lib/moonlogs-ruby/version.rb +2 -2
  46. data/lib/moonlogs-ruby.rb +2 -1
  47. data/moonlogs-ruby.gemspec +1 -1
  48. data/spec/models/inline_response_200_14_spec.rb +64 -0
  49. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d91115531d1e2a9fbad736b06f631cf4505d5033101e86230dab72fcc5d1b8d
4
- data.tar.gz: 73797e3007010f50f3ac80f9f01ffe3069ee21bfaeafade20f6fa9197f955e46
3
+ metadata.gz: b2d990e9e8b64d99d8d9d1997e1a9c2d265136ec4974a654668c105a27bc75f2
4
+ data.tar.gz: 12c49534dfd27cab0aef4791749d6433223dc23817cb2427b62ca28d4d049a22
5
5
  SHA512:
6
- metadata.gz: c832ea8a8001c02818d563e83c1a5d1183dcb498ee59cf1a6ec88bcfdfb048d4d9a1001705e4a99999ede9c0d4c436fc74a9fdfdc5815f3aba29d723939a0800
7
- data.tar.gz: 808cf041cd1d81cd464e9deb672de83ce300c9d10f8f6138ecd29f95327cfff4a017ed9f34e24a0ca88f14bf083e4fda582356c1604c2608fd00b52cd32029d3
6
+ metadata.gz: b412c3e34c8478d678f54c5114fde3aa221ac8f0b7ffedf51e13b7895ec47661d91d27850017fb263e72eb2d8134aeb1c79442ff6c74b4051333caf1843c12f4
7
+ data.tar.gz: 7d768ec82d74e0b24d2d2ed41036ba7c376c4676b209bfb42a5e0866d3e5a2ecefe52baf07aa87e91c39f23b2d5e5d7144d865313398a409f7f5a50737b80a34
data/README.md CHANGED
@@ -6,8 +6,8 @@ Moonlogs API
6
6
 
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
- - API version: 1.0.4
10
- - Package version: 1.0.4
9
+ - API version: 1.2.0
10
+ - Package version: 1.2.0
11
11
  - Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build moonlogs-ruby.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./moonlogs-ruby-1.0.4.gem
26
+ gem install ./moonlogs-ruby-1.2.0.gem
27
27
  ```
28
- (for development, run `gem install --dev ./moonlogs-ruby-1.0.4.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./moonlogs-ruby-1.2.0.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'moonlogs-ruby', '~> 1.0.4'
34
+ gem 'moonlogs-ruby', '~> 1.2.0'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -72,6 +72,21 @@ end
72
72
  MoonlogsRuby.configure do |config|
73
73
  end
74
74
 
75
+ api_instance = MoonlogsRuby::DefaultApi.new
76
+ opts = {
77
+ body: MoonlogsRuby::RecordRequest.new # RecordRequest |
78
+ }
79
+
80
+ begin
81
+ result = api_instance.create_log_async(opts)
82
+ p result
83
+ rescue MoonlogsRuby::ApiError => e
84
+ puts "Exception when calling DefaultApi->create_log_async: #{e}"
85
+ end
86
+ # Setup authorization
87
+ MoonlogsRuby.configure do |config|
88
+ end
89
+
75
90
  api_instance = MoonlogsRuby::DefaultApi.new
76
91
  opts = {
77
92
  body: MoonlogsRuby::SchemaRequest.new # SchemaRequest |
@@ -458,6 +473,7 @@ All URIs are relative to */*
458
473
  Class | Method | HTTP request | Description
459
474
  ------------ | ------------- | ------------- | -------------
460
475
  *MoonlogsRuby::DefaultApi* | [**create_log**](docs/DefaultApi.md#create_log) | **POST** /api/logs |
476
+ *MoonlogsRuby::DefaultApi* | [**create_log_async**](docs/DefaultApi.md#create_log_async) | **POST** /api/logs/async |
461
477
  *MoonlogsRuby::DefaultApi* | [**create_schema**](docs/DefaultApi.md#create_schema) | **POST** /api/schemas |
462
478
  *MoonlogsRuby::DefaultApi* | [**create_session**](docs/DefaultApi.md#create_session) | **POST** /api/session |
463
479
  *MoonlogsRuby::DefaultApi* | [**create_tag**](docs/DefaultApi.md#create_tag) | **POST** /api/tags |
@@ -497,6 +513,7 @@ Class | Method | HTTP request | Description
497
513
  - [MoonlogsRuby::InlineResponse20011](docs/InlineResponse20011.md)
498
514
  - [MoonlogsRuby::InlineResponse20012](docs/InlineResponse20012.md)
499
515
  - [MoonlogsRuby::InlineResponse20013](docs/InlineResponse20013.md)
516
+ - [MoonlogsRuby::InlineResponse20014](docs/InlineResponse20014.md)
500
517
  - [MoonlogsRuby::InlineResponse2002](docs/InlineResponse2002.md)
501
518
  - [MoonlogsRuby::InlineResponse2003](docs/InlineResponse2003.md)
502
519
  - [MoonlogsRuby::InlineResponse2004](docs/InlineResponse2004.md)
data/docs/DefaultApi.md CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to */*
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**create_log**](DefaultApi.md#create_log) | **POST** /api/logs |
8
+ [**create_log_async**](DefaultApi.md#create_log_async) | **POST** /api/logs/async |
8
9
  [**create_schema**](DefaultApi.md#create_schema) | **POST** /api/schemas |
9
10
  [**create_session**](DefaultApi.md#create_session) | **POST** /api/session |
10
11
  [**create_tag**](DefaultApi.md#create_tag) | **POST** /api/tags |
@@ -80,6 +81,53 @@ Name | Type | Description | Notes
80
81
 
81
82
 
82
83
 
84
+ # **create_log_async**
85
+ > InlineResponse20014 create_log_async(opts)
86
+
87
+
88
+
89
+ ### Example
90
+ ```ruby
91
+ # load the gem
92
+ require 'moonlogs-ruby'
93
+ # setup authorization
94
+ MoonlogsRuby.configure do |config|
95
+ end
96
+
97
+ api_instance = MoonlogsRuby::DefaultApi.new
98
+ opts = {
99
+ body: MoonlogsRuby::RecordRequest.new # RecordRequest |
100
+ }
101
+
102
+ begin
103
+ result = api_instance.create_log_async(opts)
104
+ p result
105
+ rescue MoonlogsRuby::ApiError => e
106
+ puts "Exception when calling DefaultApi->create_log_async: #{e}"
107
+ end
108
+ ```
109
+
110
+ ### Parameters
111
+
112
+ Name | Type | Description | Notes
113
+ ------------- | ------------- | ------------- | -------------
114
+ **body** | [**RecordRequest**](RecordRequest.md)| | [optional]
115
+
116
+ ### Return type
117
+
118
+ [**InlineResponse20014**](InlineResponse20014.md)
119
+
120
+ ### Authorization
121
+
122
+ [http1](../README.md#http1)
123
+
124
+ ### HTTP request headers
125
+
126
+ - **Content-Type**: application/json
127
+ - **Accept**: application/json
128
+
129
+
130
+
83
131
  # **create_schema**
84
132
  > InlineResponse2001 create_schema(opts)
85
133
 
@@ -0,0 +1,11 @@
1
+ # MoonlogsRuby::InlineResponse20014
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **success** | **BOOLEAN** | |
7
+ **code** | **Integer** | |
8
+ **error** | **String** | |
9
+ **data** | **String** | |
10
+ **meta** | [**Meta**](Meta.md) | |
11
+
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -67,6 +67,56 @@ module MoonlogsRuby
67
67
  return data, status_code, headers
68
68
  end
69
69
  # @param [Hash] opts the optional parameters
70
+ # @option opts [RecordRequest] :body
71
+ # @return [InlineResponse20014]
72
+ def create_log_async(opts = {})
73
+ data, _status_code, _headers = create_log_async_with_http_info(opts)
74
+ data
75
+ end
76
+
77
+ # @param [Hash] opts the optional parameters
78
+ # @option opts [RecordRequest] :body
79
+ # @return [Array<(InlineResponse20014, Integer, Hash)>] InlineResponse20014 data, response status code and response headers
80
+ def create_log_async_with_http_info(opts = {})
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_log_async ...'
83
+ end
84
+ # resource path
85
+ local_var_path = '/api/logs/async'
86
+
87
+ # query parameters
88
+ query_params = opts[:query_params] || {}
89
+
90
+ # header parameters
91
+ header_params = opts[:header_params] || {}
92
+ # HTTP header 'Accept' (if needed)
93
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
94
+ # HTTP header 'Content-Type'
95
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
96
+
97
+ # form parameters
98
+ form_params = opts[:form_params] || {}
99
+
100
+ # http body (model)
101
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
102
+
103
+ return_type = opts[:return_type] || 'InlineResponse20014'
104
+
105
+ auth_names = opts[:auth_names] || ['http1']
106
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
107
+ :header_params => header_params,
108
+ :query_params => query_params,
109
+ :form_params => form_params,
110
+ :body => post_body,
111
+ :auth_names => auth_names,
112
+ :return_type => return_type)
113
+
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug "API called: DefaultApi#create_log_async\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
116
+ end
117
+ return data, status_code, headers
118
+ end
119
+ # @param [Hash] opts the optional parameters
70
120
  # @option opts [SchemaRequest] :body
71
121
  # @return [InlineResponse2001]
72
122
  def create_schema(opts = {})
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -0,0 +1,267 @@
1
+ =begin
2
+ #Moonlogs
3
+
4
+ #Moonlogs API
5
+
6
+ OpenAPI spec version: 1.2.0
7
+ Contact: shalpack@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.52
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module MoonlogsRuby
15
+ class InlineResponse20014
16
+ attr_accessor :success
17
+
18
+ attr_accessor :code
19
+
20
+ attr_accessor :error
21
+
22
+ attr_accessor :data
23
+
24
+ attr_accessor :meta
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'success' => :'success',
30
+ :'code' => :'code',
31
+ :'error' => :'error',
32
+ :'data' => :'data',
33
+ :'meta' => :'meta'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'success' => :'Object',
41
+ :'code' => :'Object',
42
+ :'error' => :'Object',
43
+ :'data' => :'Object',
44
+ :'meta' => :'Object'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MoonlogsRuby::InlineResponse20014` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MoonlogsRuby::InlineResponse20014`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'success')
70
+ self.success = attributes[:'success']
71
+ end
72
+
73
+ if attributes.key?(:'code')
74
+ self.code = attributes[:'code']
75
+ end
76
+
77
+ if attributes.key?(:'error')
78
+ self.error = attributes[:'error']
79
+ end
80
+
81
+ if attributes.key?(:'data')
82
+ self.data = attributes[:'data']
83
+ end
84
+
85
+ if attributes.key?(:'meta')
86
+ self.meta = attributes[:'meta']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ invalid_properties = Array.new
94
+ if @success.nil?
95
+ invalid_properties.push('invalid value for "success", success cannot be nil.')
96
+ end
97
+
98
+ if @code.nil?
99
+ invalid_properties.push('invalid value for "code", code cannot be nil.')
100
+ end
101
+
102
+ if @error.nil?
103
+ invalid_properties.push('invalid value for "error", error cannot be nil.')
104
+ end
105
+
106
+ if @data.nil?
107
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
108
+ end
109
+
110
+ if @meta.nil?
111
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
112
+ end
113
+
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ return false if @success.nil?
121
+ return false if @code.nil?
122
+ return false if @error.nil?
123
+ return false if @data.nil?
124
+ return false if @meta.nil?
125
+ true
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ success == o.success &&
134
+ code == o.code &&
135
+ error == o.error &&
136
+ data == o.data &&
137
+ meta == o.meta
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [success, code, error, data, meta].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ new.build_from_hash(attributes)
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ self.class.openapi_types.each_pair do |key, type|
165
+ if type =~ /\AArray<(.*)>/i
166
+ # check to ensure the input is an array given that the attribute
167
+ # is documented as an array but the input is not
168
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
169
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
170
+ end
171
+ elsif !attributes[self.class.attribute_map[key]].nil?
172
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
173
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
174
+ self.send("#{key}=", nil)
175
+ end
176
+ end
177
+
178
+ self
179
+ end
180
+
181
+ # Deserializes the data based on type
182
+ # @param string type Data type
183
+ # @param string value Value to be deserialized
184
+ # @return [Object] Deserialized data
185
+ def _deserialize(type, value)
186
+ case type.to_sym
187
+ when :DateTime
188
+ DateTime.parse(value)
189
+ when :Date
190
+ Date.parse(value)
191
+ when :String
192
+ value.to_s
193
+ when :Integer
194
+ value.to_i
195
+ when :Float
196
+ value.to_f
197
+ when :Boolean
198
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
199
+ true
200
+ else
201
+ false
202
+ end
203
+ when :Object
204
+ # generic object (usually a Hash), return directly
205
+ value
206
+ when /\AArray<(?<inner_type>.+)>\z/
207
+ inner_type = Regexp.last_match[:inner_type]
208
+ value.map { |v| _deserialize(inner_type, v) }
209
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
210
+ k_type = Regexp.last_match[:k_type]
211
+ v_type = Regexp.last_match[:v_type]
212
+ {}.tap do |hash|
213
+ value.each do |k, v|
214
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
215
+ end
216
+ end
217
+ else # model
218
+ MoonlogsRuby.const_get(type).build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ if value.nil?
241
+ is_nullable = self.class.openapi_nullable.include?(attr)
242
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
243
+ end
244
+
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ # Outputs non-array value in the form of hash
251
+ # For object, use to_hash. Otherwise, just return the value
252
+ # @param [Object] value Any valid value
253
+ # @return [Hash] Returns the value in the form of hash
254
+ def _to_hash(value)
255
+ if value.is_a?(Array)
256
+ value.compact.map { |v| _to_hash(v) }
257
+ elsif value.is_a?(Hash)
258
+ {}.tap do |hash|
259
+ value.each { |k, v| hash[k] = _to_hash(v) }
260
+ end
261
+ elsif value.respond_to? :to_hash
262
+ value.to_hash
263
+ else
264
+ value
265
+ end
266
+ end end
267
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,12 +3,12 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
10
10
  =end
11
11
 
12
12
  module MoonlogsRuby
13
- VERSION = '1.0.4'
13
+ VERSION = '1.2.0'
14
14
  end
data/lib/moonlogs-ruby.rb CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.0.4
6
+ OpenAPI spec version: 1.2.0
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -25,6 +25,7 @@ require 'moonlogs-ruby/models/inline_response_200_10'
25
25
  require 'moonlogs-ruby/models/inline_response_200_11'
26
26
  require 'moonlogs-ruby/models/inline_response_200_12'
27
27
  require 'moonlogs-ruby/models/inline_response_200_13'
28
+ require 'moonlogs-ruby/models/inline_response_200_14'
28
29
  require 'moonlogs-ruby/models/inline_response_200_2'
29
30
  require 'moonlogs-ruby/models/inline_response_200_3'
30
31
  require 'moonlogs-ruby/models/inline_response_200_4'
@@ -5,7 +5,7 @@
5
5
 
6
6
  #Moonlogs API
7
7
 
8
- OpenAPI spec version: 1.0.4
8
+ OpenAPI spec version: 1.2.0
9
9
  Contact: shalpack@gmail.com
10
10
  Generated by: https://github.com/swagger-api/swagger-codegen.git
11
11
  Swagger Codegen version: 3.0.52
@@ -0,0 +1,64 @@
1
+ =begin
2
+ #Moonlogs
3
+
4
+ #Moonlogs API
5
+
6
+ OpenAPI spec version: 1.1.0
7
+ Contact: shalpack@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.52
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+ require 'date'
15
+
16
+ # Unit tests for MoonlogsRuby::InlineResponse20014
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'InlineResponse20014' do
20
+ before do
21
+ # run before each test
22
+ @instance = MoonlogsRuby::InlineResponse20014.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of InlineResponse20014' do
30
+ it 'should create an instance of InlineResponse20014' do
31
+ expect(@instance).to be_instance_of(MoonlogsRuby::InlineResponse20014)
32
+ end
33
+ end
34
+ describe 'test attribute "success"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "code"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "error"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "data"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ describe 'test attribute "meta"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
64
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moonlogs-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swagger-Codegen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
11
+ date: 2024-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -91,6 +91,7 @@ files:
91
91
  - docs/InlineResponse20011.md
92
92
  - docs/InlineResponse20012.md
93
93
  - docs/InlineResponse20013.md
94
+ - docs/InlineResponse20014.md
94
95
  - docs/InlineResponse2002.md
95
96
  - docs/InlineResponse2003.md
96
97
  - docs/InlineResponse2004.md
@@ -140,6 +141,7 @@ files:
140
141
  - lib/moonlogs-ruby/models/inline_response_200_11.rb
141
142
  - lib/moonlogs-ruby/models/inline_response_200_12.rb
142
143
  - lib/moonlogs-ruby/models/inline_response_200_13.rb
144
+ - lib/moonlogs-ruby/models/inline_response_200_14.rb
143
145
  - lib/moonlogs-ruby/models/inline_response_200_2.rb
144
146
  - lib/moonlogs-ruby/models/inline_response_200_3.rb
145
147
  - lib/moonlogs-ruby/models/inline_response_200_4.rb
@@ -187,6 +189,7 @@ files:
187
189
  - spec/models/inline_response_200_11_spec.rb
188
190
  - spec/models/inline_response_200_12_spec.rb
189
191
  - spec/models/inline_response_200_13_spec.rb
192
+ - spec/models/inline_response_200_14_spec.rb
190
193
  - spec/models/inline_response_200_1_spec.rb
191
194
  - spec/models/inline_response_200_2_spec.rb
192
195
  - spec/models/inline_response_200_3_spec.rb
@@ -291,6 +294,7 @@ test_files:
291
294
  - spec/models/inline_response_200_6_spec.rb
292
295
  - spec/models/user_request_spec.rb
293
296
  - spec/models/inline_response_200_spec.rb
297
+ - spec/models/inline_response_200_14_spec.rb
294
298
  - spec/models/schema_spec.rb
295
299
  - spec/models/inline_response_200_8_spec.rb
296
300
  - spec/models/inline_response_200_4_spec.rb