weft-sdk 0.2.1

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 (81) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +9 -0
  3. data/docs/APIKeysApi.md +208 -0
  4. data/docs/AccountApi.md +72 -0
  5. data/docs/AccountDetails.md +30 -0
  6. data/docs/Agent.md +38 -0
  7. data/docs/AgentListResponse.md +20 -0
  8. data/docs/AgentResponse.md +18 -0
  9. data/docs/AgentStats.md +30 -0
  10. data/docs/AgentsApi.md +147 -0
  11. data/docs/ApiKey.md +28 -0
  12. data/docs/ApiKeyCreated.md +26 -0
  13. data/docs/ApiKeyCreatedResponse.md +18 -0
  14. data/docs/ApiKeyListResponse.md +18 -0
  15. data/docs/AuthApi.md +385 -0
  16. data/docs/AuthResponse.md +18 -0
  17. data/docs/AuthResponseData.md +22 -0
  18. data/docs/ConfirmRequest.md +18 -0
  19. data/docs/CreateApiKeyRequest.md +18 -0
  20. data/docs/DefaultApi.md +67 -0
  21. data/docs/Error.md +24 -0
  22. data/docs/ErrorResponse.md +18 -0
  23. data/docs/MeResponse.md +18 -0
  24. data/docs/MessageResponse.md +18 -0
  25. data/docs/MessageResponseData.md +18 -0
  26. data/docs/Pagination.md +24 -0
  27. data/docs/PasswordResetRequest.md +18 -0
  28. data/docs/PasswordUpdateRequest.md +22 -0
  29. data/docs/Payment.md +44 -0
  30. data/docs/PaymentListResponse.md +20 -0
  31. data/docs/PaymentResponse.md +18 -0
  32. data/docs/PaymentsApi.md +147 -0
  33. data/docs/ResendConfirmationRequest.md +18 -0
  34. data/docs/SignInRequest.md +20 -0
  35. data/docs/SignUpRequest.md +22 -0
  36. data/docs/User.md +22 -0
  37. data/lib/weft/facilitator/client.rb +89 -0
  38. data/lib/weft/facilitator/fee.rb +47 -0
  39. data/lib/weft/facilitator/middleware.rb +190 -0
  40. data/lib/weft/generated/api/account_api.rb +77 -0
  41. data/lib/weft/generated/api/agents_api.rb +148 -0
  42. data/lib/weft/generated/api/api_keys_api.rb +204 -0
  43. data/lib/weft/generated/api/auth_api.rb +418 -0
  44. data/lib/weft/generated/api/default_api.rb +77 -0
  45. data/lib/weft/generated/api/payments_api.rb +148 -0
  46. data/lib/weft/generated/api_client.rb +397 -0
  47. data/lib/weft/generated/api_error.rb +58 -0
  48. data/lib/weft/generated/api_model_base.rb +88 -0
  49. data/lib/weft/generated/configuration.rb +317 -0
  50. data/lib/weft/generated/models/account_details.rb +310 -0
  51. data/lib/weft/generated/models/agent.rb +417 -0
  52. data/lib/weft/generated/models/agent_list_response.rb +192 -0
  53. data/lib/weft/generated/models/agent_response.rb +164 -0
  54. data/lib/weft/generated/models/agent_stats.rb +201 -0
  55. data/lib/weft/generated/models/api_key.rb +244 -0
  56. data/lib/weft/generated/models/api_key_created.rb +252 -0
  57. data/lib/weft/generated/models/api_key_created_response.rb +164 -0
  58. data/lib/weft/generated/models/api_key_list_response.rb +166 -0
  59. data/lib/weft/generated/models/auth_response.rb +164 -0
  60. data/lib/weft/generated/models/auth_response_data.rb +199 -0
  61. data/lib/weft/generated/models/confirm_request.rb +164 -0
  62. data/lib/weft/generated/models/create_api_key_request.rb +148 -0
  63. data/lib/weft/generated/models/error.rb +208 -0
  64. data/lib/weft/generated/models/error_response.rb +164 -0
  65. data/lib/weft/generated/models/me_response.rb +164 -0
  66. data/lib/weft/generated/models/message_response.rb +164 -0
  67. data/lib/weft/generated/models/message_response_data.rb +164 -0
  68. data/lib/weft/generated/models/pagination.rb +242 -0
  69. data/lib/weft/generated/models/password_reset_request.rb +164 -0
  70. data/lib/weft/generated/models/password_update_request.rb +216 -0
  71. data/lib/weft/generated/models/payment.rb +437 -0
  72. data/lib/weft/generated/models/payment_list_response.rb +192 -0
  73. data/lib/weft/generated/models/payment_response.rb +164 -0
  74. data/lib/weft/generated/models/resend_confirmation_request.rb +164 -0
  75. data/lib/weft/generated/models/sign_in_request.rb +190 -0
  76. data/lib/weft/generated/models/sign_up_request.rb +216 -0
  77. data/lib/weft/generated/models/user.rb +199 -0
  78. data/lib/weft/generated/version.rb +15 -0
  79. data/lib/weft/generated.rb +4 -0
  80. data/lib/weft/sdk.rb +10 -0
  81. metadata +123 -0
@@ -0,0 +1,252 @@
1
+ =begin
2
+ #Weft API
3
+
4
+ #API for agent-first payments and discovery.
5
+
6
+ The version of the OpenAPI document: 0.2.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Weft
17
+ class ApiKeyCreated < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :key_prefix
23
+
24
+ # Full API key (shown only once at creation)
25
+ attr_accessor :raw_key
26
+
27
+ attr_accessor :created_at
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'id' => :'id',
33
+ :'name' => :'name',
34
+ :'key_prefix' => :'key_prefix',
35
+ :'raw_key' => :'raw_key',
36
+ :'created_at' => :'created_at'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'id' => :'Integer',
54
+ :'name' => :'String',
55
+ :'key_prefix' => :'String',
56
+ :'raw_key' => :'String',
57
+ :'created_at' => :'Time'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Weft::ApiKeyCreated` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Weft::ApiKeyCreated`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'id')
84
+ self.id = attributes[:'id']
85
+ else
86
+ self.id = nil
87
+ end
88
+
89
+ if attributes.key?(:'name')
90
+ self.name = attributes[:'name']
91
+ end
92
+
93
+ if attributes.key?(:'key_prefix')
94
+ self.key_prefix = attributes[:'key_prefix']
95
+ else
96
+ self.key_prefix = nil
97
+ end
98
+
99
+ if attributes.key?(:'raw_key')
100
+ self.raw_key = attributes[:'raw_key']
101
+ else
102
+ self.raw_key = nil
103
+ end
104
+
105
+ if attributes.key?(:'created_at')
106
+ self.created_at = attributes[:'created_at']
107
+ else
108
+ self.created_at = nil
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
116
+ invalid_properties = Array.new
117
+ if @id.nil?
118
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
119
+ end
120
+
121
+ if @key_prefix.nil?
122
+ invalid_properties.push('invalid value for "key_prefix", key_prefix cannot be nil.')
123
+ end
124
+
125
+ if @raw_key.nil?
126
+ invalid_properties.push('invalid value for "raw_key", raw_key cannot be nil.')
127
+ end
128
+
129
+ if @created_at.nil?
130
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
131
+ end
132
+
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ warn '[DEPRECATED] the `valid?` method is obsolete'
140
+ return false if @id.nil?
141
+ return false if @key_prefix.nil?
142
+ return false if @raw_key.nil?
143
+ return false if @created_at.nil?
144
+ true
145
+ end
146
+
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] id Value to be assigned
149
+ def id=(id)
150
+ if id.nil?
151
+ fail ArgumentError, 'id cannot be nil'
152
+ end
153
+
154
+ @id = id
155
+ end
156
+
157
+ # Custom attribute writer method with validation
158
+ # @param [Object] key_prefix Value to be assigned
159
+ def key_prefix=(key_prefix)
160
+ if key_prefix.nil?
161
+ fail ArgumentError, 'key_prefix cannot be nil'
162
+ end
163
+
164
+ @key_prefix = key_prefix
165
+ end
166
+
167
+ # Custom attribute writer method with validation
168
+ # @param [Object] raw_key Value to be assigned
169
+ def raw_key=(raw_key)
170
+ if raw_key.nil?
171
+ fail ArgumentError, 'raw_key cannot be nil'
172
+ end
173
+
174
+ @raw_key = raw_key
175
+ end
176
+
177
+ # Custom attribute writer method with validation
178
+ # @param [Object] created_at Value to be assigned
179
+ def created_at=(created_at)
180
+ if created_at.nil?
181
+ fail ArgumentError, 'created_at cannot be nil'
182
+ end
183
+
184
+ @created_at = created_at
185
+ end
186
+
187
+ # Checks equality by comparing each attribute.
188
+ # @param [Object] Object to be compared
189
+ def ==(o)
190
+ return true if self.equal?(o)
191
+ self.class == o.class &&
192
+ id == o.id &&
193
+ name == o.name &&
194
+ key_prefix == o.key_prefix &&
195
+ raw_key == o.raw_key &&
196
+ created_at == o.created_at
197
+ end
198
+
199
+ # @see the `==` method
200
+ # @param [Object] Object to be compared
201
+ def eql?(o)
202
+ self == o
203
+ end
204
+
205
+ # Calculates hash code according to all attributes.
206
+ # @return [Integer] Hash code
207
+ def hash
208
+ [id, name, key_prefix, raw_key, created_at].hash
209
+ end
210
+
211
+ # Builds the object from hash
212
+ # @param [Hash] attributes Model attributes in the form of hash
213
+ # @return [Object] Returns the model itself
214
+ def self.build_from_hash(attributes)
215
+ return nil unless attributes.is_a?(Hash)
216
+ attributes = attributes.transform_keys(&:to_sym)
217
+ transformed_hash = {}
218
+ openapi_types.each_pair do |key, type|
219
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
220
+ transformed_hash["#{key}"] = nil
221
+ elsif type =~ /\AArray<(.*)>/i
222
+ # check to ensure the input is an array given that the attribute
223
+ # is documented as an array but the input is not
224
+ if attributes[attribute_map[key]].is_a?(Array)
225
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
226
+ end
227
+ elsif !attributes[attribute_map[key]].nil?
228
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
229
+ end
230
+ end
231
+ new(transformed_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
+ end
251
+
252
+ end
@@ -0,0 +1,164 @@
1
+ =begin
2
+ #Weft API
3
+
4
+ #API for agent-first payments and discovery.
5
+
6
+ The version of the OpenAPI document: 0.2.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Weft
17
+ class ApiKeyCreatedResponse < ApiModelBase
18
+ attr_accessor :data
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'data' => :'ApiKeyCreated'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Weft::ApiKeyCreatedResponse` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Weft::ApiKeyCreatedResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'data')
67
+ self.data = attributes[:'data']
68
+ else
69
+ self.data = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @data.nil?
79
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @data.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] data Value to be assigned
95
+ def data=(data)
96
+ if data.nil?
97
+ fail ArgumentError, 'data cannot be nil'
98
+ end
99
+
100
+ @data = data
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ data == o.data
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [data].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #Weft API
3
+
4
+ #API for agent-first payments and discovery.
5
+
6
+ The version of the OpenAPI document: 0.2.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Weft
17
+ class ApiKeyListResponse < ApiModelBase
18
+ attr_accessor :data
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'data' => :'Array<ApiKey>'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Weft::ApiKeyListResponse` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Weft::ApiKeyListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'data')
67
+ if (value = attributes[:'data']).is_a?(Array)
68
+ self.data = value
69
+ end
70
+ else
71
+ self.data = nil
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
+ invalid_properties = Array.new
80
+ if @data.nil?
81
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ return false if @data.nil?
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param [Object] data Value to be assigned
97
+ def data=(data)
98
+ if data.nil?
99
+ fail ArgumentError, 'data cannot be nil'
100
+ end
101
+
102
+ @data = data
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ data == o.data
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [data].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Returns the object in the form of hash
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_hash
151
+ hash = {}
152
+ self.class.attribute_map.each_pair do |attr, param|
153
+ value = self.send(attr)
154
+ if value.nil?
155
+ is_nullable = self.class.openapi_nullable.include?(attr)
156
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
+ end
158
+
159
+ hash[param] = _to_hash(value)
160
+ end
161
+ hash
162
+ end
163
+
164
+ end
165
+
166
+ end