fountain_partner_api_client 0.0.1 → 0.0.3

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 (91) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -23
  3. data/docs/DefaultApi.md +1 -229
  4. data/docs/V1PartnersIdGet200Response1DataAttributes.md +2 -2
  5. data/docs/V1PartnersIdGet200ResponseDataAttributes.md +2 -2
  6. data/docs/V1PartnersIdGetRequest.md +2 -0
  7. data/docs/V1PartnersIdGetRequestPartner.md +1 -1
  8. data/docs/V1PartnersIdPut200Response.md +18 -0
  9. data/docs/V1PartnersIdPut200ResponseData.md +22 -0
  10. data/docs/V1PartnersIdPut200ResponseDataAttributes.md +38 -0
  11. data/docs/V1PartnersIdPutRequest.md +20 -0
  12. data/docs/V1PartnersIdPutRequestPartner.md +36 -0
  13. data/fountain_partner_api_client-0.0.2.gem +0 -0
  14. data/fountain_partner_api_client.gemspec +1 -1
  15. data/lib/fountain_partner_api_client/api/default_api.rb +0 -222
  16. data/lib/fountain_partner_api_client/configuration.rb +3 -3
  17. data/lib/fountain_partner_api_client/models/v1_partners_id_get200_response1_data_attributes.rb +8 -4
  18. data/lib/fountain_partner_api_client/models/v1_partners_id_get200_response_data_attributes.rb +8 -4
  19. data/lib/fountain_partner_api_client/models/v1_partners_id_get_request.rb +10 -1
  20. data/lib/fountain_partner_api_client/models/v1_partners_id_get_request_partner.rb +4 -2
  21. data/lib/{openapi_client/models/v1_partners_id_get200_response1.rb → fountain_partner_api_client/models/v1_partners_id_put200_response.rb} +6 -6
  22. data/lib/{openapi_client/models/v1_partners_id_get200_response_data.rb → fountain_partner_api_client/models/v1_partners_id_put200_response_data.rb} +6 -6
  23. data/lib/{openapi_client/models/v1_partners_id_get200_response1_data_attributes.rb → fountain_partner_api_client/models/v1_partners_id_put200_response_data_attributes.rb} +6 -24
  24. data/lib/{openapi_client/models/v1_partners_id_get_request.rb → fountain_partner_api_client/models/v1_partners_id_put_request.rb} +16 -7
  25. data/lib/{openapi_client/models/v1_partners_id_get_request_partner.rb → fountain_partner_api_client/models/v1_partners_id_put_request_partner.rb} +6 -15
  26. data/lib/fountain_partner_api_client/version.rb +1 -1
  27. data/lib/fountain_partner_api_client.rb +0 -10
  28. data/spec/api/default_api_spec.rb +5 -57
  29. data/spec/configuration_spec.rb +3 -3
  30. data/spec/models/v1_partners_id_get200_response1_data_attributes_spec.rb +4 -4
  31. data/spec/models/v1_partners_id_get200_response1_data_spec.rb +4 -4
  32. data/spec/models/v1_partners_id_get200_response1_spec.rb +4 -4
  33. data/spec/models/v1_partners_id_get200_response_data_attributes_spec.rb +4 -4
  34. data/spec/models/v1_partners_id_get200_response_data_spec.rb +4 -4
  35. data/spec/models/v1_partners_id_get200_response_spec.rb +4 -4
  36. data/spec/models/v1_partners_id_get_request_partner_spec.rb +4 -4
  37. data/spec/models/v1_partners_id_get_request_spec.rb +10 -4
  38. data/spec/models/v1_partners_id_put200_response_data_attributes_spec.rb +94 -0
  39. data/spec/models/v1_partners_id_put200_response_data_spec.rb +46 -0
  40. data/spec/models/{v1_partners_id_applicants_applicant_id_put_request_spec.rb → v1_partners_id_put200_response_spec.rb} +7 -7
  41. data/spec/models/v1_partners_id_put_request_partner_spec.rb +88 -0
  42. data/spec/models/{v1_partners_id_applicants_applicant_id_put200_response_spec.rb → v1_partners_id_put_request_spec.rb} +8 -8
  43. metadata +24 -68
  44. data/docs/V1PartnersIdApplicantsApplicantIdDetailsPostRequest.md +0 -18
  45. data/docs/V1PartnersIdApplicantsApplicantIdDetailsPostRequestApplicant.md +0 -18
  46. data/docs/V1PartnersIdApplicantsApplicantIdDetailsPostRequestApplicantPartnerDetails.md +0 -26
  47. data/docs/V1PartnersIdApplicantsApplicantIdPut200Response.md +0 -20
  48. data/docs/V1PartnersIdApplicantsApplicantIdPutRequest.md +0 -18
  49. data/docs/V1PartnersIdApplicantsApplicantIdPutRequestApplicant.md +0 -18
  50. data/docs/V1PartnersIdApplicantsApplicantIdPutRequestApplicantLabelsInner.md +0 -18
  51. data/docs/V1PartnersIdApplicantsApplicantIdStatusPostRequest.md +0 -18
  52. data/docs/V1PartnersIdApplicantsApplicantIdStatusPostRequestApplicant.md +0 -18
  53. data/docs/V1PartnersIdApplicantsApplicantIdStatusPostRequestApplicantPartnerStatus.md +0 -26
  54. data/lib/fountain_partner_api_client/models/v1_partners_id_applicants_applicant_id_details_post_request.rb +0 -219
  55. data/lib/fountain_partner_api_client/models/v1_partners_id_applicants_applicant_id_details_post_request_applicant.rb +0 -219
  56. data/lib/fountain_partner_api_client/models/v1_partners_id_applicants_applicant_id_details_post_request_applicant_partner_details.rb +0 -255
  57. data/lib/fountain_partner_api_client/models/v1_partners_id_applicants_applicant_id_put200_response.rb +0 -230
  58. data/lib/fountain_partner_api_client/models/v1_partners_id_applicants_applicant_id_put_request.rb +0 -219
  59. data/lib/fountain_partner_api_client/models/v1_partners_id_applicants_applicant_id_put_request_applicant.rb +0 -221
  60. data/lib/fountain_partner_api_client/models/v1_partners_id_applicants_applicant_id_put_request_applicant_labels_inner.rb +0 -219
  61. data/lib/fountain_partner_api_client/models/v1_partners_id_applicants_applicant_id_status_post_request.rb +0 -219
  62. data/lib/fountain_partner_api_client/models/v1_partners_id_applicants_applicant_id_status_post_request_applicant.rb +0 -219
  63. data/lib/fountain_partner_api_client/models/v1_partners_id_applicants_applicant_id_status_post_request_applicant_partner_status.rb +0 -255
  64. data/lib/openapi_client/api/default_api.rb +0 -379
  65. data/lib/openapi_client/api_client.rb +0 -392
  66. data/lib/openapi_client/api_error.rb +0 -57
  67. data/lib/openapi_client/configuration.rb +0 -279
  68. data/lib/openapi_client/models/v1_partners_id_applicants_applicant_id_details_post_request.rb +0 -219
  69. data/lib/openapi_client/models/v1_partners_id_applicants_applicant_id_details_post_request_applicant.rb +0 -219
  70. data/lib/openapi_client/models/v1_partners_id_applicants_applicant_id_details_post_request_applicant_partner_details.rb +0 -255
  71. data/lib/openapi_client/models/v1_partners_id_applicants_applicant_id_put200_response.rb +0 -230
  72. data/lib/openapi_client/models/v1_partners_id_applicants_applicant_id_put_request.rb +0 -219
  73. data/lib/openapi_client/models/v1_partners_id_applicants_applicant_id_put_request_applicant.rb +0 -221
  74. data/lib/openapi_client/models/v1_partners_id_applicants_applicant_id_put_request_applicant_labels_inner.rb +0 -219
  75. data/lib/openapi_client/models/v1_partners_id_applicants_applicant_id_status_post_request.rb +0 -219
  76. data/lib/openapi_client/models/v1_partners_id_applicants_applicant_id_status_post_request_applicant.rb +0 -219
  77. data/lib/openapi_client/models/v1_partners_id_applicants_applicant_id_status_post_request_applicant_partner_status.rb +0 -255
  78. data/lib/openapi_client/models/v1_partners_id_get200_response.rb +0 -219
  79. data/lib/openapi_client/models/v1_partners_id_get200_response1_data.rb +0 -237
  80. data/lib/openapi_client/models/v1_partners_id_get200_response_data_attributes.rb +0 -309
  81. data/lib/openapi_client/version.rb +0 -15
  82. data/lib/openapi_client.rb +0 -58
  83. data/openapi_client.gemspec +0 -38
  84. data/spec/models/v1_partners_id_applicants_applicant_id_details_post_request_applicant_partner_details_spec.rb +0 -58
  85. data/spec/models/v1_partners_id_applicants_applicant_id_details_post_request_applicant_spec.rb +0 -34
  86. data/spec/models/v1_partners_id_applicants_applicant_id_details_post_request_spec.rb +0 -34
  87. data/spec/models/v1_partners_id_applicants_applicant_id_put_request_applicant_labels_inner_spec.rb +0 -34
  88. data/spec/models/v1_partners_id_applicants_applicant_id_put_request_applicant_spec.rb +0 -34
  89. data/spec/models/v1_partners_id_applicants_applicant_id_status_post_request_applicant_partner_status_spec.rb +0 -58
  90. data/spec/models/v1_partners_id_applicants_applicant_id_status_post_request_applicant_spec.rb +0 -34
  91. data/spec/models/v1_partners_id_applicants_applicant_id_status_post_request_spec.rb +0 -34
@@ -1,255 +0,0 @@
1
- =begin
2
- #Fountain Partner Docs
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: v1
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.2.1
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module OpenapiClient
17
- class V1PartnersIdApplicantsApplicantIdDetailsPostRequestApplicantPartnerDetails
18
- attr_accessor :account_option
19
-
20
- attr_accessor :category
21
-
22
- attr_accessor :key
23
-
24
- attr_accessor :label
25
-
26
- attr_accessor :value
27
-
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'account_option' => :'account_option',
32
- :'category' => :'category',
33
- :'key' => :'key',
34
- :'label' => :'label',
35
- :'value' => :'value'
36
- }
37
- end
38
-
39
- # Returns all the JSON keys this model knows about
40
- def self.acceptable_attributes
41
- attribute_map.values
42
- end
43
-
44
- # Attribute type mapping.
45
- def self.openapi_types
46
- {
47
- :'account_option' => :'String',
48
- :'category' => :'String',
49
- :'key' => :'String',
50
- :'label' => :'String',
51
- :'value' => :'String'
52
- }
53
- end
54
-
55
- # List of attributes with nullable: true
56
- def self.openapi_nullable
57
- Set.new([
58
- ])
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::V1PartnersIdApplicantsApplicantIdDetailsPostRequestApplicantPartnerDetails` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- attributes = attributes.each_with_object({}) { |(k, v), h|
70
- if (!self.class.attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::V1PartnersIdApplicantsApplicantIdDetailsPostRequestApplicantPartnerDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
- end
73
- h[k.to_sym] = v
74
- }
75
-
76
- if attributes.key?(:'account_option')
77
- self.account_option = attributes[:'account_option']
78
- end
79
-
80
- if attributes.key?(:'category')
81
- self.category = attributes[:'category']
82
- end
83
-
84
- if attributes.key?(:'key')
85
- self.key = attributes[:'key']
86
- end
87
-
88
- if attributes.key?(:'label')
89
- self.label = attributes[:'label']
90
- end
91
-
92
- if attributes.key?(:'value')
93
- self.value = attributes[:'value']
94
- end
95
- end
96
-
97
- # Show invalid properties with the reasons. Usually used together with valid?
98
- # @return Array for valid properties with the reasons
99
- def list_invalid_properties
100
- invalid_properties = Array.new
101
- invalid_properties
102
- end
103
-
104
- # Check to see if the all the properties in the model are valid
105
- # @return true if the model is valid
106
- def valid?
107
- true
108
- end
109
-
110
- # Checks equality by comparing each attribute.
111
- # @param [Object] Object to be compared
112
- def ==(o)
113
- return true if self.equal?(o)
114
- self.class == o.class &&
115
- account_option == o.account_option &&
116
- category == o.category &&
117
- key == o.key &&
118
- label == o.label &&
119
- value == o.value
120
- end
121
-
122
- # @see the `==` method
123
- # @param [Object] Object to be compared
124
- def eql?(o)
125
- self == o
126
- end
127
-
128
- # Calculates hash code according to all attributes.
129
- # @return [Integer] Hash code
130
- def hash
131
- [account_option, category, key, label, value].hash
132
- end
133
-
134
- # Builds the object from hash
135
- # @param [Hash] attributes Model attributes in the form of hash
136
- # @return [Object] Returns the model itself
137
- def self.build_from_hash(attributes)
138
- new.build_from_hash(attributes)
139
- end
140
-
141
- # Builds the object from hash
142
- # @param [Hash] attributes Model attributes in the form of hash
143
- # @return [Object] Returns the model itself
144
- def build_from_hash(attributes)
145
- return nil unless attributes.is_a?(Hash)
146
- attributes = attributes.transform_keys(&:to_sym)
147
- self.class.openapi_types.each_pair do |key, type|
148
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
- self.send("#{key}=", nil)
150
- elsif type =~ /\AArray<(.*)>/i
151
- # check to ensure the input is an array given that the attribute
152
- # is documented as an array but the input is not
153
- if attributes[self.class.attribute_map[key]].is_a?(Array)
154
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
155
- end
156
- elsif !attributes[self.class.attribute_map[key]].nil?
157
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
- end
159
- end
160
-
161
- self
162
- end
163
-
164
- # Deserializes the data based on type
165
- # @param string type Data type
166
- # @param string value Value to be deserialized
167
- # @return [Object] Deserialized data
168
- def _deserialize(type, value)
169
- case type.to_sym
170
- when :Time
171
- Time.parse(value)
172
- when :Date
173
- Date.parse(value)
174
- when :String
175
- value.to_s
176
- when :Integer
177
- value.to_i
178
- when :Float
179
- value.to_f
180
- when :Boolean
181
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
- true
183
- else
184
- false
185
- end
186
- when :Object
187
- # generic object (usually a Hash), return directly
188
- value
189
- when /\AArray<(?<inner_type>.+)>\z/
190
- inner_type = Regexp.last_match[:inner_type]
191
- value.map { |v| _deserialize(inner_type, v) }
192
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
193
- k_type = Regexp.last_match[:k_type]
194
- v_type = Regexp.last_match[:v_type]
195
- {}.tap do |hash|
196
- value.each do |k, v|
197
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
198
- end
199
- end
200
- else # model
201
- # models (e.g. Pet) or oneOf
202
- klass = OpenapiClient.const_get(type)
203
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
- end
205
- end
206
-
207
- # Returns the string representation of the object
208
- # @return [String] String presentation of the object
209
- def to_s
210
- to_hash.to_s
211
- end
212
-
213
- # to_body is an alias to to_hash (backward compatibility)
214
- # @return [Hash] Returns the object in the form of hash
215
- def to_body
216
- to_hash
217
- end
218
-
219
- # Returns the object in the form of hash
220
- # @return [Hash] Returns the object in the form of hash
221
- def to_hash
222
- hash = {}
223
- self.class.attribute_map.each_pair do |attr, param|
224
- value = self.send(attr)
225
- if value.nil?
226
- is_nullable = self.class.openapi_nullable.include?(attr)
227
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
- end
229
-
230
- hash[param] = _to_hash(value)
231
- end
232
- hash
233
- end
234
-
235
- # Outputs non-array value in the form of hash
236
- # For object, use to_hash. Otherwise, just return the value
237
- # @param [Object] value Any valid value
238
- # @return [Hash] Returns the value in the form of hash
239
- def _to_hash(value)
240
- if value.is_a?(Array)
241
- value.compact.map { |v| _to_hash(v) }
242
- elsif value.is_a?(Hash)
243
- {}.tap do |hash|
244
- value.each { |k, v| hash[k] = _to_hash(v) }
245
- end
246
- elsif value.respond_to? :to_hash
247
- value.to_hash
248
- else
249
- value
250
- end
251
- end
252
-
253
- end
254
-
255
- end
@@ -1,230 +0,0 @@
1
- =begin
2
- #Fountain Partner Docs
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: v1
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.2.1
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module OpenapiClient
17
- class V1PartnersIdApplicantsApplicantIdPut200Response
18
- attr_accessor :applicant_id
19
-
20
- attr_accessor :applicant_labels
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'applicant_id' => :'applicant_id',
26
- :'applicant_labels' => :'applicant_labels'
27
- }
28
- end
29
-
30
- # Returns all the JSON keys this model knows about
31
- def self.acceptable_attributes
32
- attribute_map.values
33
- end
34
-
35
- # Attribute type mapping.
36
- def self.openapi_types
37
- {
38
- :'applicant_id' => :'String',
39
- :'applicant_labels' => :'Array<V1PartnersIdApplicantsApplicantIdPutRequestApplicantLabelsInner>'
40
- }
41
- end
42
-
43
- # List of attributes with nullable: true
44
- def self.openapi_nullable
45
- Set.new([
46
- ])
47
- end
48
-
49
- # Initializes the object
50
- # @param [Hash] attributes Model attributes in the form of hash
51
- def initialize(attributes = {})
52
- if (!attributes.is_a?(Hash))
53
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::V1PartnersIdApplicantsApplicantIdPut200Response` initialize method"
54
- end
55
-
56
- # check to see if the attribute exists and convert string to symbol for hash key
57
- attributes = attributes.each_with_object({}) { |(k, v), h|
58
- if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::V1PartnersIdApplicantsApplicantIdPut200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
- end
61
- h[k.to_sym] = v
62
- }
63
-
64
- if attributes.key?(:'applicant_id')
65
- self.applicant_id = attributes[:'applicant_id']
66
- end
67
-
68
- if attributes.key?(:'applicant_labels')
69
- if (value = attributes[:'applicant_labels']).is_a?(Array)
70
- self.applicant_labels = value
71
- end
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
- invalid_properties = Array.new
79
- invalid_properties
80
- end
81
-
82
- # Check to see if the all the properties in the model are valid
83
- # @return true if the model is valid
84
- def valid?
85
- true
86
- end
87
-
88
- # Checks equality by comparing each attribute.
89
- # @param [Object] Object to be compared
90
- def ==(o)
91
- return true if self.equal?(o)
92
- self.class == o.class &&
93
- applicant_id == o.applicant_id &&
94
- applicant_labels == o.applicant_labels
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
- [applicant_id, applicant_labels].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
- attributes = attributes.transform_keys(&:to_sym)
122
- self.class.openapi_types.each_pair do |key, type|
123
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
- self.send("#{key}=", nil)
125
- elsif type =~ /\AArray<(.*)>/i
126
- # check to ensure the input is an array given that the attribute
127
- # is documented as an array but the input is not
128
- if attributes[self.class.attribute_map[key]].is_a?(Array)
129
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
- end
131
- elsif !attributes[self.class.attribute_map[key]].nil?
132
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
- end
134
- end
135
-
136
- self
137
- end
138
-
139
- # Deserializes the data based on type
140
- # @param string type Data type
141
- # @param string value Value to be deserialized
142
- # @return [Object] Deserialized data
143
- def _deserialize(type, value)
144
- case type.to_sym
145
- when :Time
146
- Time.parse(value)
147
- when :Date
148
- Date.parse(value)
149
- when :String
150
- value.to_s
151
- when :Integer
152
- value.to_i
153
- when :Float
154
- value.to_f
155
- when :Boolean
156
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
- true
158
- else
159
- false
160
- end
161
- when :Object
162
- # generic object (usually a Hash), return directly
163
- value
164
- when /\AArray<(?<inner_type>.+)>\z/
165
- inner_type = Regexp.last_match[:inner_type]
166
- value.map { |v| _deserialize(inner_type, v) }
167
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
- k_type = Regexp.last_match[:k_type]
169
- v_type = Regexp.last_match[:v_type]
170
- {}.tap do |hash|
171
- value.each do |k, v|
172
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
- end
174
- end
175
- else # model
176
- # models (e.g. Pet) or oneOf
177
- klass = OpenapiClient.const_get(type)
178
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
- end
180
- end
181
-
182
- # Returns the string representation of the object
183
- # @return [String] String presentation of the object
184
- def to_s
185
- to_hash.to_s
186
- end
187
-
188
- # to_body is an alias to to_hash (backward compatibility)
189
- # @return [Hash] Returns the object in the form of hash
190
- def to_body
191
- to_hash
192
- end
193
-
194
- # Returns the object in the form of hash
195
- # @return [Hash] Returns the object in the form of hash
196
- def to_hash
197
- hash = {}
198
- self.class.attribute_map.each_pair do |attr, param|
199
- value = self.send(attr)
200
- if value.nil?
201
- is_nullable = self.class.openapi_nullable.include?(attr)
202
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
- end
204
-
205
- hash[param] = _to_hash(value)
206
- end
207
- hash
208
- end
209
-
210
- # Outputs non-array value in the form of hash
211
- # For object, use to_hash. Otherwise, just return the value
212
- # @param [Object] value Any valid value
213
- # @return [Hash] Returns the value in the form of hash
214
- def _to_hash(value)
215
- if value.is_a?(Array)
216
- value.compact.map { |v| _to_hash(v) }
217
- elsif value.is_a?(Hash)
218
- {}.tap do |hash|
219
- value.each { |k, v| hash[k] = _to_hash(v) }
220
- end
221
- elsif value.respond_to? :to_hash
222
- value.to_hash
223
- else
224
- value
225
- end
226
- end
227
-
228
- end
229
-
230
- end
@@ -1,219 +0,0 @@
1
- =begin
2
- #Fountain Partner Docs
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: v1
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.2.1
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module OpenapiClient
17
- class V1PartnersIdApplicantsApplicantIdPutRequest
18
- attr_accessor :applicant
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'applicant' => :'applicant'
24
- }
25
- end
26
-
27
- # Returns all the JSON keys this model knows about
28
- def self.acceptable_attributes
29
- attribute_map.values
30
- end
31
-
32
- # Attribute type mapping.
33
- def self.openapi_types
34
- {
35
- :'applicant' => :'V1PartnersIdApplicantsApplicantIdPutRequestApplicant'
36
- }
37
- end
38
-
39
- # List of attributes with nullable: true
40
- def self.openapi_nullable
41
- Set.new([
42
- ])
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::V1PartnersIdApplicantsApplicantIdPutRequest` initialize method"
50
- end
51
-
52
- # check to see if the attribute exists and convert string to symbol for hash key
53
- attributes = attributes.each_with_object({}) { |(k, v), h|
54
- if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::V1PartnersIdApplicantsApplicantIdPutRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
- end
57
- h[k.to_sym] = v
58
- }
59
-
60
- if attributes.key?(:'applicant')
61
- self.applicant = attributes[:'applicant']
62
- end
63
- end
64
-
65
- # Show invalid properties with the reasons. Usually used together with valid?
66
- # @return Array for valid properties with the reasons
67
- def list_invalid_properties
68
- invalid_properties = Array.new
69
- invalid_properties
70
- end
71
-
72
- # Check to see if the all the properties in the model are valid
73
- # @return true if the model is valid
74
- def valid?
75
- true
76
- end
77
-
78
- # Checks equality by comparing each attribute.
79
- # @param [Object] Object to be compared
80
- def ==(o)
81
- return true if self.equal?(o)
82
- self.class == o.class &&
83
- applicant == o.applicant
84
- end
85
-
86
- # @see the `==` method
87
- # @param [Object] Object to be compared
88
- def eql?(o)
89
- self == o
90
- end
91
-
92
- # Calculates hash code according to all attributes.
93
- # @return [Integer] Hash code
94
- def hash
95
- [applicant].hash
96
- end
97
-
98
- # Builds the object from hash
99
- # @param [Hash] attributes Model attributes in the form of hash
100
- # @return [Object] Returns the model itself
101
- def self.build_from_hash(attributes)
102
- new.build_from_hash(attributes)
103
- end
104
-
105
- # Builds the object from hash
106
- # @param [Hash] attributes Model attributes in the form of hash
107
- # @return [Object] Returns the model itself
108
- def build_from_hash(attributes)
109
- return nil unless attributes.is_a?(Hash)
110
- attributes = attributes.transform_keys(&:to_sym)
111
- self.class.openapi_types.each_pair do |key, type|
112
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
- self.send("#{key}=", nil)
114
- elsif type =~ /\AArray<(.*)>/i
115
- # check to ensure the input is an array given that the attribute
116
- # is documented as an array but the input is not
117
- if attributes[self.class.attribute_map[key]].is_a?(Array)
118
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
- end
120
- elsif !attributes[self.class.attribute_map[key]].nil?
121
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
- end
123
- end
124
-
125
- self
126
- end
127
-
128
- # Deserializes the data based on type
129
- # @param string type Data type
130
- # @param string value Value to be deserialized
131
- # @return [Object] Deserialized data
132
- def _deserialize(type, value)
133
- case type.to_sym
134
- when :Time
135
- Time.parse(value)
136
- when :Date
137
- Date.parse(value)
138
- when :String
139
- value.to_s
140
- when :Integer
141
- value.to_i
142
- when :Float
143
- value.to_f
144
- when :Boolean
145
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
- true
147
- else
148
- false
149
- end
150
- when :Object
151
- # generic object (usually a Hash), return directly
152
- value
153
- when /\AArray<(?<inner_type>.+)>\z/
154
- inner_type = Regexp.last_match[:inner_type]
155
- value.map { |v| _deserialize(inner_type, v) }
156
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
- k_type = Regexp.last_match[:k_type]
158
- v_type = Regexp.last_match[:v_type]
159
- {}.tap do |hash|
160
- value.each do |k, v|
161
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
- end
163
- end
164
- else # model
165
- # models (e.g. Pet) or oneOf
166
- klass = OpenapiClient.const_get(type)
167
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
- end
169
- end
170
-
171
- # Returns the string representation of the object
172
- # @return [String] String presentation of the object
173
- def to_s
174
- to_hash.to_s
175
- end
176
-
177
- # to_body is an alias to to_hash (backward compatibility)
178
- # @return [Hash] Returns the object in the form of hash
179
- def to_body
180
- to_hash
181
- end
182
-
183
- # Returns the object in the form of hash
184
- # @return [Hash] Returns the object in the form of hash
185
- def to_hash
186
- hash = {}
187
- self.class.attribute_map.each_pair do |attr, param|
188
- value = self.send(attr)
189
- if value.nil?
190
- is_nullable = self.class.openapi_nullable.include?(attr)
191
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
- end
193
-
194
- hash[param] = _to_hash(value)
195
- end
196
- hash
197
- end
198
-
199
- # Outputs non-array value in the form of hash
200
- # For object, use to_hash. Otherwise, just return the value
201
- # @param [Object] value Any valid value
202
- # @return [Hash] Returns the value in the form of hash
203
- def _to_hash(value)
204
- if value.is_a?(Array)
205
- value.compact.map { |v| _to_hash(v) }
206
- elsif value.is_a?(Hash)
207
- {}.tap do |hash|
208
- value.each { |k, v| hash[k] = _to_hash(v) }
209
- end
210
- elsif value.respond_to? :to_hash
211
- value.to_hash
212
- else
213
- value
214
- end
215
- end
216
-
217
- end
218
-
219
- end