docusign_rooms 1.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +66 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +71 -0
- data/LICENSE +21 -0
- data/README.md +80 -0
- data/Rakefile +8 -0
- data/docusign_rooms-1.0.0.pre.alpha.gem +0 -0
- data/docusign_rooms.gemspec +45 -0
- data/git_push.sh +55 -0
- data/lib/.DS_Store +0 -0
- data/lib/docusign_rooms.rb +193 -0
- data/lib/docusign_rooms/.DS_Store +0 -0
- data/lib/docusign_rooms/api/accounts_api.rb +73 -0
- data/lib/docusign_rooms/api/activity_types_api.rb +69 -0
- data/lib/docusign_rooms/api/closing_statuses_api.rb +69 -0
- data/lib/docusign_rooms/api/contact_sides_api.rb +69 -0
- data/lib/docusign_rooms/api/countries_api.rb +69 -0
- data/lib/docusign_rooms/api/currencies_api.rb +69 -0
- data/lib/docusign_rooms/api/documents_api.rb +200 -0
- data/lib/docusign_rooms/api/e_sign_permission_profiles_api.rb +73 -0
- data/lib/docusign_rooms/api/external_form_fill_sessions_api.rb +79 -0
- data/lib/docusign_rooms/api/fields_api.rb +92 -0
- data/lib/docusign_rooms/api/financing_types_api.rb +69 -0
- data/lib/docusign_rooms/api/form_details_api.rb +77 -0
- data/lib/docusign_rooms/api/form_groups_api.rb +89 -0
- data/lib/docusign_rooms/api/form_libraries_api.rb +158 -0
- data/lib/docusign_rooms/api/offices_api.rb +310 -0
- data/lib/docusign_rooms/api/origins_of_leads_api.rb +69 -0
- data/lib/docusign_rooms/api/property_types_api.rb +69 -0
- data/lib/docusign_rooms/api/regions_api.rb +306 -0
- data/lib/docusign_rooms/api/roles_api.rb +328 -0
- data/lib/docusign_rooms/api/room_contact_types_api.rb +69 -0
- data/lib/docusign_rooms/api/room_folders_api.rb +93 -0
- data/lib/docusign_rooms/api/room_templates_api.rb +97 -0
- data/lib/docusign_rooms/api/rooms_api.rb +1146 -0
- data/lib/docusign_rooms/api/seller_decision_types_api.rb +69 -0
- data/lib/docusign_rooms/api/special_circumstance_types_api.rb +69 -0
- data/lib/docusign_rooms/api/states_api.rb +69 -0
- data/lib/docusign_rooms/api/task_date_types_api.rb +69 -0
- data/lib/docusign_rooms/api/task_list_templates_api.rb +89 -0
- data/lib/docusign_rooms/api/task_lists_api.rb +188 -0
- data/lib/docusign_rooms/api/task_responsibility_types_api.rb +69 -0
- data/lib/docusign_rooms/api/task_statuses_api.rb +69 -0
- data/lib/docusign_rooms/api/time_zones_api.rb +69 -0
- data/lib/docusign_rooms/api/transaction_sides_api.rb +69 -0
- data/lib/docusign_rooms/api/users_api.rb +908 -0
- data/lib/docusign_rooms/client/.DS_Store +0 -0
- data/lib/docusign_rooms/client/api_client.rb +590 -0
- data/lib/docusign_rooms/client/api_error.rb +37 -0
- data/lib/docusign_rooms/client/auth/oauth.rb +1061 -0
- data/lib/docusign_rooms/configuration.rb +202 -0
- data/lib/docusign_rooms/models/account_summary.rb +262 -0
- data/lib/docusign_rooms/models/activity_type.rb +192 -0
- data/lib/docusign_rooms/models/api_error.rb +192 -0
- data/lib/docusign_rooms/models/assignable_roles.rb +239 -0
- data/lib/docusign_rooms/models/classic_admin_to_invite.rb +216 -0
- data/lib/docusign_rooms/models/classic_agent_to_invite.rb +240 -0
- data/lib/docusign_rooms/models/classic_manager_permissions.rb +291 -0
- data/lib/docusign_rooms/models/classic_manager_to_invite.rb +338 -0
- data/lib/docusign_rooms/models/closing_status.rb +192 -0
- data/lib/docusign_rooms/models/contact_side.rb +192 -0
- data/lib/docusign_rooms/models/country.rb +192 -0
- data/lib/docusign_rooms/models/currency.rb +192 -0
- data/lib/docusign_rooms/models/custom_data.rb +192 -0
- data/lib/docusign_rooms/models/depends_on.rb +192 -0
- data/lib/docusign_rooms/models/designated_office.rb +188 -0
- data/lib/docusign_rooms/models/designated_region.rb +188 -0
- data/lib/docusign_rooms/models/document.rb +265 -0
- data/lib/docusign_rooms/models/document_user.rb +291 -0
- data/lib/docusign_rooms/models/document_user_for_create.rb +188 -0
- data/lib/docusign_rooms/models/e_sign_account_role_settings.rb +183 -0
- data/lib/docusign_rooms/models/e_sign_permission_profile.rb +201 -0
- data/lib/docusign_rooms/models/e_sign_permission_profile_list.rb +185 -0
- data/lib/docusign_rooms/models/external_form_fill_session.rb +183 -0
- data/lib/docusign_rooms/models/external_form_fill_session_for_create.rb +211 -0
- data/lib/docusign_rooms/models/field.rb +248 -0
- data/lib/docusign_rooms/models/field_configuration.rb +259 -0
- data/lib/docusign_rooms/models/field_data.rb +185 -0
- data/lib/docusign_rooms/models/field_data_for_create.rb +185 -0
- data/lib/docusign_rooms/models/field_data_for_update.rb +185 -0
- data/lib/docusign_rooms/models/field_set.rb +203 -0
- data/lib/docusign_rooms/models/financing_type.rb +192 -0
- data/lib/docusign_rooms/models/form_details.rb +246 -0
- data/lib/docusign_rooms/models/form_for_add.rb +188 -0
- data/lib/docusign_rooms/models/form_group_summary.rb +201 -0
- data/lib/docusign_rooms/models/form_group_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/form_library_summary.rb +201 -0
- data/lib/docusign_rooms/models/form_library_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/form_summary.rb +201 -0
- data/lib/docusign_rooms/models/form_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/global_activity_types.rb +185 -0
- data/lib/docusign_rooms/models/global_closing_statuses.rb +185 -0
- data/lib/docusign_rooms/models/global_contact_sides.rb +185 -0
- data/lib/docusign_rooms/models/global_countries.rb +185 -0
- data/lib/docusign_rooms/models/global_currencies.rb +185 -0
- data/lib/docusign_rooms/models/global_financing_types.rb +185 -0
- data/lib/docusign_rooms/models/global_origins_of_leads.rb +185 -0
- data/lib/docusign_rooms/models/global_property_types.rb +185 -0
- data/lib/docusign_rooms/models/global_room_contact_types.rb +185 -0
- data/lib/docusign_rooms/models/global_seller_decision_types.rb +185 -0
- data/lib/docusign_rooms/models/global_special_circumstance_types.rb +185 -0
- data/lib/docusign_rooms/models/global_states.rb +185 -0
- data/lib/docusign_rooms/models/global_task_date_types.rb +185 -0
- data/lib/docusign_rooms/models/global_task_responsibility_types.rb +185 -0
- data/lib/docusign_rooms/models/global_task_statuses.rb +185 -0
- data/lib/docusign_rooms/models/global_time_zones.rb +185 -0
- data/lib/docusign_rooms/models/global_transaction_sides.rb +185 -0
- data/lib/docusign_rooms/models/locked_out_details.rb +188 -0
- data/lib/docusign_rooms/models/nullable_field_data.rb +185 -0
- data/lib/docusign_rooms/models/nullable_permissions.rb +660 -0
- data/lib/docusign_rooms/models/office.rb +287 -0
- data/lib/docusign_rooms/models/office_for_create.rb +269 -0
- data/lib/docusign_rooms/models/office_reference_count.rb +192 -0
- data/lib/docusign_rooms/models/office_reference_count_list.rb +185 -0
- data/lib/docusign_rooms/models/office_summary.rb +282 -0
- data/lib/docusign_rooms/models/office_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/origin_of_lead.rb +192 -0
- data/lib/docusign_rooms/models/permissions.rb +660 -0
- data/lib/docusign_rooms/models/property_type.rb +192 -0
- data/lib/docusign_rooms/models/region.rb +206 -0
- data/lib/docusign_rooms/models/region_reference_count.rb +192 -0
- data/lib/docusign_rooms/models/region_reference_count_list.rb +185 -0
- data/lib/docusign_rooms/models/region_summary.rb +201 -0
- data/lib/docusign_rooms/models/region_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/role.rb +246 -0
- data/lib/docusign_rooms/models/role_for_create.rb +201 -0
- data/lib/docusign_rooms/models/role_for_update.rb +201 -0
- data/lib/docusign_rooms/models/role_summary.rb +228 -0
- data/lib/docusign_rooms/models/role_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/room.rb +282 -0
- data/lib/docusign_rooms/models/room_contact_type.rb +192 -0
- data/lib/docusign_rooms/models/room_document.rb +246 -0
- data/lib/docusign_rooms/models/room_document_list.rb +230 -0
- data/lib/docusign_rooms/models/room_folder.rb +201 -0
- data/lib/docusign_rooms/models/room_folder_list.rb +230 -0
- data/lib/docusign_rooms/models/room_for_create.rb +248 -0
- data/lib/docusign_rooms/models/room_invite.rb +240 -0
- data/lib/docusign_rooms/models/room_invite_response.rb +237 -0
- data/lib/docusign_rooms/models/room_picture.rb +183 -0
- data/lib/docusign_rooms/models/room_summary.rb +273 -0
- data/lib/docusign_rooms/models/room_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/room_template.rb +201 -0
- data/lib/docusign_rooms/models/room_templates_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/room_user.rb +246 -0
- data/lib/docusign_rooms/models/room_user_for_update.rb +192 -0
- data/lib/docusign_rooms/models/room_user_removal_detail.rb +183 -0
- data/lib/docusign_rooms/models/room_user_summary.rb +237 -0
- data/lib/docusign_rooms/models/room_users_result.rb +230 -0
- data/lib/docusign_rooms/models/select_list_field_option.rb +201 -0
- data/lib/docusign_rooms/models/seller_decision_type.rb +192 -0
- data/lib/docusign_rooms/models/special_circumstance_type.rb +192 -0
- data/lib/docusign_rooms/models/state.rb +192 -0
- data/lib/docusign_rooms/models/task_date_type.rb +192 -0
- data/lib/docusign_rooms/models/task_list.rb +275 -0
- data/lib/docusign_rooms/models/task_list_for_create.rb +183 -0
- data/lib/docusign_rooms/models/task_list_summary.rb +264 -0
- data/lib/docusign_rooms/models/task_list_summary_list.rb +185 -0
- data/lib/docusign_rooms/models/task_list_template.rb +210 -0
- data/lib/docusign_rooms/models/task_list_template_list.rb +230 -0
- data/lib/docusign_rooms/models/task_responsibility_type.rb +192 -0
- data/lib/docusign_rooms/models/task_status.rb +192 -0
- data/lib/docusign_rooms/models/task_summary.rb +291 -0
- data/lib/docusign_rooms/models/time_zone.rb +192 -0
- data/lib/docusign_rooms/models/transaction_side.rb +192 -0
- data/lib/docusign_rooms/models/user.rb +338 -0
- data/lib/docusign_rooms/models/user_for_update.rb +188 -0
- data/lib/docusign_rooms/models/user_summary.rb +307 -0
- data/lib/docusign_rooms/models/user_summary_list.rb +230 -0
- data/lib/docusign_rooms/models/user_to_invite.rb +337 -0
- data/lib/docusign_rooms/version.rb +14 -0
- data/tests/Gemfile +5 -0
- data/tests/Gemfile.lock +42 -0
- data/tests/docs/Test.pdf +0 -0
- data/tests/docs/private.pem +27 -0
- data/tests/spec/unit_tests_using_jwt_spec.rb +125 -0
- metadata +420 -0
@@ -0,0 +1,185 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Rooms API - v2
|
3
|
+
|
4
|
+
#An API for an integrator to access the features of DocuSign Rooms
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_Rooms
|
15
|
+
class FieldDataForUpdate
|
16
|
+
attr_accessor :data
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'data' => :'data'
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.swagger_types
|
27
|
+
{
|
28
|
+
:'data' => :'Hash<String, Object>'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Initializes the object
|
33
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
34
|
+
def initialize(attributes = {})
|
35
|
+
return unless attributes.is_a?(Hash)
|
36
|
+
|
37
|
+
# convert string to symbol for hash key
|
38
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
39
|
+
|
40
|
+
if attributes.has_key?(:'data')
|
41
|
+
if (value = attributes[:'data']).is_a?(Hash)
|
42
|
+
self.data = value
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
48
|
+
# @return Array for valid properties with the reasons
|
49
|
+
def list_invalid_properties
|
50
|
+
invalid_properties = Array.new
|
51
|
+
invalid_properties
|
52
|
+
end
|
53
|
+
|
54
|
+
# Check to see if the all the properties in the model are valid
|
55
|
+
# @return true if the model is valid
|
56
|
+
def valid?
|
57
|
+
true
|
58
|
+
end
|
59
|
+
|
60
|
+
# Checks equality by comparing each attribute.
|
61
|
+
# @param [Object] Object to be compared
|
62
|
+
def ==(o)
|
63
|
+
return true if self.equal?(o)
|
64
|
+
self.class == o.class &&
|
65
|
+
data == o.data
|
66
|
+
end
|
67
|
+
|
68
|
+
# @see the `==` method
|
69
|
+
# @param [Object] Object to be compared
|
70
|
+
def eql?(o)
|
71
|
+
self == o
|
72
|
+
end
|
73
|
+
|
74
|
+
# Calculates hash code according to all attributes.
|
75
|
+
# @return [Fixnum] Hash code
|
76
|
+
def hash
|
77
|
+
[data].hash
|
78
|
+
end
|
79
|
+
|
80
|
+
# Builds the object from hash
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
# @return [Object] Returns the model itself
|
83
|
+
def build_from_hash(attributes)
|
84
|
+
return nil unless attributes.is_a?(Hash)
|
85
|
+
self.class.swagger_types.each_pair do |key, type|
|
86
|
+
if type =~ /\AArray<(.*)>/i
|
87
|
+
# check to ensure the input is an array given that the attribute
|
88
|
+
# is documented as an array but the input is not
|
89
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
90
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
91
|
+
end
|
92
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
93
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
94
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
95
|
+
end
|
96
|
+
|
97
|
+
self
|
98
|
+
end
|
99
|
+
|
100
|
+
# Deserializes the data based on type
|
101
|
+
# @param string type Data type
|
102
|
+
# @param string value Value to be deserialized
|
103
|
+
# @return [Object] Deserialized data
|
104
|
+
def _deserialize(type, value)
|
105
|
+
case type.to_sym
|
106
|
+
when :DateTime
|
107
|
+
DateTime.parse(value)
|
108
|
+
when :Date
|
109
|
+
Date.parse(value)
|
110
|
+
when :String
|
111
|
+
value.to_s
|
112
|
+
when :Integer
|
113
|
+
value.to_i
|
114
|
+
when :Float
|
115
|
+
value.to_f
|
116
|
+
when :BOOLEAN
|
117
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
118
|
+
true
|
119
|
+
else
|
120
|
+
false
|
121
|
+
end
|
122
|
+
when :Object
|
123
|
+
# generic object (usually a Hash), return directly
|
124
|
+
value
|
125
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
126
|
+
inner_type = Regexp.last_match[:inner_type]
|
127
|
+
value.map { |v| _deserialize(inner_type, v) }
|
128
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
129
|
+
k_type = Regexp.last_match[:k_type]
|
130
|
+
v_type = Regexp.last_match[:v_type]
|
131
|
+
{}.tap do |hash|
|
132
|
+
value.each do |k, v|
|
133
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
else # model
|
137
|
+
temp_model = DocuSign_Rooms.const_get(type).new
|
138
|
+
temp_model.build_from_hash(value)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# Returns the string representation of the object
|
143
|
+
# @return [String] String presentation of the object
|
144
|
+
def to_s
|
145
|
+
to_hash.to_s
|
146
|
+
end
|
147
|
+
|
148
|
+
# to_body is an alias to to_hash (backward compatibility)
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
150
|
+
def to_body
|
151
|
+
to_hash
|
152
|
+
end
|
153
|
+
|
154
|
+
# Returns the object in the form of hash
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
156
|
+
def to_hash
|
157
|
+
hash = {}
|
158
|
+
self.class.attribute_map.each_pair do |attr, param|
|
159
|
+
value = self.send(attr)
|
160
|
+
next if value.nil?
|
161
|
+
hash[param] = _to_hash(value)
|
162
|
+
end
|
163
|
+
hash
|
164
|
+
end
|
165
|
+
|
166
|
+
# Outputs non-array value in the form of hash
|
167
|
+
# For object, use to_hash. Otherwise, just return the value
|
168
|
+
# @param [Object] value Any valid value
|
169
|
+
# @return [Hash] Returns the value in the form of hash
|
170
|
+
def _to_hash(value)
|
171
|
+
if value.is_a?(Array)
|
172
|
+
value.compact.map { |v| _to_hash(v) }
|
173
|
+
elsif value.is_a?(Hash)
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
176
|
+
end
|
177
|
+
elsif value.respond_to? :to_hash
|
178
|
+
value.to_hash
|
179
|
+
else
|
180
|
+
value
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
end
|
185
|
+
end
|
@@ -0,0 +1,203 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Rooms API - v2
|
3
|
+
|
4
|
+
#An API for an integrator to access the features of DocuSign Rooms
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_Rooms
|
15
|
+
class FieldSet
|
16
|
+
attr_accessor :field_set_id
|
17
|
+
|
18
|
+
attr_accessor :title
|
19
|
+
|
20
|
+
attr_accessor :fields
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'field_set_id' => :'fieldSetId',
|
26
|
+
:'title' => :'title',
|
27
|
+
:'fields' => :'fields'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'field_set_id' => :'String',
|
35
|
+
:'title' => :'String',
|
36
|
+
:'fields' => :'Array<Field>'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
return unless attributes.is_a?(Hash)
|
44
|
+
|
45
|
+
# convert string to symbol for hash key
|
46
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
47
|
+
|
48
|
+
if attributes.has_key?(:'fieldSetId')
|
49
|
+
self.field_set_id = attributes[:'fieldSetId']
|
50
|
+
end
|
51
|
+
|
52
|
+
if attributes.has_key?(:'title')
|
53
|
+
self.title = attributes[:'title']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes.has_key?(:'fields')
|
57
|
+
if (value = attributes[:'fields']).is_a?(Array)
|
58
|
+
self.fields = value
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
64
|
+
# @return Array for valid properties with the reasons
|
65
|
+
def list_invalid_properties
|
66
|
+
invalid_properties = Array.new
|
67
|
+
invalid_properties
|
68
|
+
end
|
69
|
+
|
70
|
+
# Check to see if the all the properties in the model are valid
|
71
|
+
# @return true if the model is valid
|
72
|
+
def valid?
|
73
|
+
true
|
74
|
+
end
|
75
|
+
|
76
|
+
# Checks equality by comparing each attribute.
|
77
|
+
# @param [Object] Object to be compared
|
78
|
+
def ==(o)
|
79
|
+
return true if self.equal?(o)
|
80
|
+
self.class == o.class &&
|
81
|
+
field_set_id == o.field_set_id &&
|
82
|
+
title == o.title &&
|
83
|
+
fields == o.fields
|
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 [Fixnum] Hash code
|
94
|
+
def hash
|
95
|
+
[field_set_id, title, fields].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 build_from_hash(attributes)
|
102
|
+
return nil unless attributes.is_a?(Hash)
|
103
|
+
self.class.swagger_types.each_pair do |key, type|
|
104
|
+
if type =~ /\AArray<(.*)>/i
|
105
|
+
# check to ensure the input is an array given that the attribute
|
106
|
+
# is documented as an array but the input is not
|
107
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
108
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
109
|
+
end
|
110
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
111
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
112
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
113
|
+
end
|
114
|
+
|
115
|
+
self
|
116
|
+
end
|
117
|
+
|
118
|
+
# Deserializes the data based on type
|
119
|
+
# @param string type Data type
|
120
|
+
# @param string value Value to be deserialized
|
121
|
+
# @return [Object] Deserialized data
|
122
|
+
def _deserialize(type, value)
|
123
|
+
case type.to_sym
|
124
|
+
when :DateTime
|
125
|
+
DateTime.parse(value)
|
126
|
+
when :Date
|
127
|
+
Date.parse(value)
|
128
|
+
when :String
|
129
|
+
value.to_s
|
130
|
+
when :Integer
|
131
|
+
value.to_i
|
132
|
+
when :Float
|
133
|
+
value.to_f
|
134
|
+
when :BOOLEAN
|
135
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
136
|
+
true
|
137
|
+
else
|
138
|
+
false
|
139
|
+
end
|
140
|
+
when :Object
|
141
|
+
# generic object (usually a Hash), return directly
|
142
|
+
value
|
143
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
144
|
+
inner_type = Regexp.last_match[:inner_type]
|
145
|
+
value.map { |v| _deserialize(inner_type, v) }
|
146
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
147
|
+
k_type = Regexp.last_match[:k_type]
|
148
|
+
v_type = Regexp.last_match[:v_type]
|
149
|
+
{}.tap do |hash|
|
150
|
+
value.each do |k, v|
|
151
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
else # model
|
155
|
+
temp_model = DocuSign_Rooms.const_get(type).new
|
156
|
+
temp_model.build_from_hash(value)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
# Returns the string representation of the object
|
161
|
+
# @return [String] String presentation of the object
|
162
|
+
def to_s
|
163
|
+
to_hash.to_s
|
164
|
+
end
|
165
|
+
|
166
|
+
# to_body is an alias to to_hash (backward compatibility)
|
167
|
+
# @return [Hash] Returns the object in the form of hash
|
168
|
+
def to_body
|
169
|
+
to_hash
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the object in the form of hash
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
174
|
+
def to_hash
|
175
|
+
hash = {}
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
177
|
+
value = self.send(attr)
|
178
|
+
next if value.nil?
|
179
|
+
hash[param] = _to_hash(value)
|
180
|
+
end
|
181
|
+
hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Outputs non-array value in the form of hash
|
185
|
+
# For object, use to_hash. Otherwise, just return the value
|
186
|
+
# @param [Object] value Any valid value
|
187
|
+
# @return [Hash] Returns the value in the form of hash
|
188
|
+
def _to_hash(value)
|
189
|
+
if value.is_a?(Array)
|
190
|
+
value.compact.map { |v| _to_hash(v) }
|
191
|
+
elsif value.is_a?(Hash)
|
192
|
+
{}.tap do |hash|
|
193
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
194
|
+
end
|
195
|
+
elsif value.respond_to? :to_hash
|
196
|
+
value.to_hash
|
197
|
+
else
|
198
|
+
value
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
end
|
203
|
+
end
|
@@ -0,0 +1,192 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Rooms API - v2
|
3
|
+
|
4
|
+
#An API for an integrator to access the features of DocuSign Rooms
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module DocuSign_Rooms
|
15
|
+
class FinancingType
|
16
|
+
attr_accessor :financing_type_id
|
17
|
+
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'financing_type_id' => :'financingTypeId',
|
24
|
+
:'name' => :'name'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.swagger_types
|
30
|
+
{
|
31
|
+
:'financing_type_id' => :'String',
|
32
|
+
:'name' => :'String'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Initializes the object
|
37
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
38
|
+
def initialize(attributes = {})
|
39
|
+
return unless attributes.is_a?(Hash)
|
40
|
+
|
41
|
+
# convert string to symbol for hash key
|
42
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
43
|
+
|
44
|
+
if attributes.has_key?(:'financingTypeId')
|
45
|
+
self.financing_type_id = attributes[:'financingTypeId']
|
46
|
+
end
|
47
|
+
|
48
|
+
if attributes.has_key?(:'name')
|
49
|
+
self.name = attributes[:'name']
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
54
|
+
# @return Array for valid properties with the reasons
|
55
|
+
def list_invalid_properties
|
56
|
+
invalid_properties = Array.new
|
57
|
+
invalid_properties
|
58
|
+
end
|
59
|
+
|
60
|
+
# Check to see if the all the properties in the model are valid
|
61
|
+
# @return true if the model is valid
|
62
|
+
def valid?
|
63
|
+
true
|
64
|
+
end
|
65
|
+
|
66
|
+
# Checks equality by comparing each attribute.
|
67
|
+
# @param [Object] Object to be compared
|
68
|
+
def ==(o)
|
69
|
+
return true if self.equal?(o)
|
70
|
+
self.class == o.class &&
|
71
|
+
financing_type_id == o.financing_type_id &&
|
72
|
+
name == o.name
|
73
|
+
end
|
74
|
+
|
75
|
+
# @see the `==` method
|
76
|
+
# @param [Object] Object to be compared
|
77
|
+
def eql?(o)
|
78
|
+
self == o
|
79
|
+
end
|
80
|
+
|
81
|
+
# Calculates hash code according to all attributes.
|
82
|
+
# @return [Fixnum] Hash code
|
83
|
+
def hash
|
84
|
+
[financing_type_id, name].hash
|
85
|
+
end
|
86
|
+
|
87
|
+
# Builds the object from hash
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
89
|
+
# @return [Object] Returns the model itself
|
90
|
+
def build_from_hash(attributes)
|
91
|
+
return nil unless attributes.is_a?(Hash)
|
92
|
+
self.class.swagger_types.each_pair do |key, type|
|
93
|
+
if type =~ /\AArray<(.*)>/i
|
94
|
+
# check to ensure the input is an array given that the attribute
|
95
|
+
# is documented as an array but the input is not
|
96
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
97
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
98
|
+
end
|
99
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
100
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
101
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
102
|
+
end
|
103
|
+
|
104
|
+
self
|
105
|
+
end
|
106
|
+
|
107
|
+
# Deserializes the data based on type
|
108
|
+
# @param string type Data type
|
109
|
+
# @param string value Value to be deserialized
|
110
|
+
# @return [Object] Deserialized data
|
111
|
+
def _deserialize(type, value)
|
112
|
+
case type.to_sym
|
113
|
+
when :DateTime
|
114
|
+
DateTime.parse(value)
|
115
|
+
when :Date
|
116
|
+
Date.parse(value)
|
117
|
+
when :String
|
118
|
+
value.to_s
|
119
|
+
when :Integer
|
120
|
+
value.to_i
|
121
|
+
when :Float
|
122
|
+
value.to_f
|
123
|
+
when :BOOLEAN
|
124
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
125
|
+
true
|
126
|
+
else
|
127
|
+
false
|
128
|
+
end
|
129
|
+
when :Object
|
130
|
+
# generic object (usually a Hash), return directly
|
131
|
+
value
|
132
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
133
|
+
inner_type = Regexp.last_match[:inner_type]
|
134
|
+
value.map { |v| _deserialize(inner_type, v) }
|
135
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
136
|
+
k_type = Regexp.last_match[:k_type]
|
137
|
+
v_type = Regexp.last_match[:v_type]
|
138
|
+
{}.tap do |hash|
|
139
|
+
value.each do |k, v|
|
140
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
else # model
|
144
|
+
temp_model = DocuSign_Rooms.const_get(type).new
|
145
|
+
temp_model.build_from_hash(value)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# Returns the string representation of the object
|
150
|
+
# @return [String] String presentation of the object
|
151
|
+
def to_s
|
152
|
+
to_hash.to_s
|
153
|
+
end
|
154
|
+
|
155
|
+
# to_body is an alias to to_hash (backward compatibility)
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
def to_body
|
158
|
+
to_hash
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the object in the form of hash
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
163
|
+
def to_hash
|
164
|
+
hash = {}
|
165
|
+
self.class.attribute_map.each_pair do |attr, param|
|
166
|
+
value = self.send(attr)
|
167
|
+
next if value.nil?
|
168
|
+
hash[param] = _to_hash(value)
|
169
|
+
end
|
170
|
+
hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Outputs non-array value in the form of hash
|
174
|
+
# For object, use to_hash. Otherwise, just return the value
|
175
|
+
# @param [Object] value Any valid value
|
176
|
+
# @return [Hash] Returns the value in the form of hash
|
177
|
+
def _to_hash(value)
|
178
|
+
if value.is_a?(Array)
|
179
|
+
value.compact.map { |v| _to_hash(v) }
|
180
|
+
elsif value.is_a?(Hash)
|
181
|
+
{}.tap do |hash|
|
182
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
183
|
+
end
|
184
|
+
elsif value.respond_to? :to_hash
|
185
|
+
value.to_hash
|
186
|
+
else
|
187
|
+
value
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
end
|
192
|
+
end
|