dock_genius_api_ruby_client 0.1.1.pre.gcf82e3 → 0.1.2.pre.ge30447

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/config.json +10 -0
  3. data/dg-api-gem/.git/HEAD +1 -0
  4. data/dg-api-gem/.git/config +13 -0
  5. data/dg-api-gem/.git/description +1 -0
  6. data/dg-api-gem/.git/hooks/applypatch-msg.sample +15 -0
  7. data/dg-api-gem/.git/hooks/commit-msg.sample +24 -0
  8. data/dg-api-gem/.git/hooks/post-update.sample +8 -0
  9. data/dg-api-gem/.git/hooks/pre-applypatch.sample +14 -0
  10. data/dg-api-gem/.git/hooks/pre-commit.sample +49 -0
  11. data/dg-api-gem/.git/hooks/pre-push.sample +53 -0
  12. data/dg-api-gem/.git/hooks/pre-rebase.sample +169 -0
  13. data/dg-api-gem/.git/hooks/prepare-commit-msg.sample +36 -0
  14. data/dg-api-gem/.git/hooks/update.sample +128 -0
  15. data/dg-api-gem/.git/index +0 -0
  16. data/dg-api-gem/.git/info/exclude +6 -0
  17. data/dg-api-gem/.git/logs/HEAD +1 -0
  18. data/dg-api-gem/.git/logs/refs/heads/master +1 -0
  19. data/dg-api-gem/.git/logs/refs/remotes/origin/HEAD +1 -0
  20. data/dg-api-gem/.git/objects/00/0bf2136d3179234ddfecb13b26554f9e2f4c90 +0 -0
  21. data/dg-api-gem/.git/objects/03/251f753635b5302d85ffa2b7681623f1f21542 +0 -0
  22. data/dg-api-gem/.git/objects/0a/5c33a52fbb06520d06bbc5f4b124ed1a9528f6 +0 -0
  23. data/dg-api-gem/.git/objects/0f/7798223856c806d373ea8da2ecfb127ab097f4 +0 -0
  24. data/dg-api-gem/.git/objects/10/7ee96a08afe27a4dbe411d6b7ac7274c584dff +0 -0
  25. data/dg-api-gem/.git/objects/18/2ba7055e1aeb4216346152e66e65bddb4c0cf9 +2 -0
  26. data/dg-api-gem/.git/objects/19/1bf6a3c7f96f990c9d13c896a93f3c1d9f20c9 +0 -0
  27. data/dg-api-gem/.git/objects/19/b847fbc31f64ac4362d110c32fe9bbac30b096 +0 -0
  28. data/dg-api-gem/.git/objects/1a/825f63ae485ff56b4faf701ba522bcc0561f78 +3 -0
  29. data/dg-api-gem/.git/objects/1d/691d2d0dbb43d184a96fa3cdb1d3c00a1f4f38 +0 -0
  30. data/dg-api-gem/.git/objects/23/9dbff8bc51ff15a56d0faa3c02e63fed5fcb2c +0 -0
  31. data/dg-api-gem/.git/objects/26/3386d2358171da7acc57031821ab5f4d05f2b2 +0 -0
  32. data/dg-api-gem/.git/objects/2e/c238e03b0fe3c4de9a778eae988047d90adedb +0 -0
  33. data/dg-api-gem/.git/objects/36/1530690b4e5068a46af4e84ffcffcc05fdc4e9 +0 -0
  34. data/dg-api-gem/.git/objects/39/851c468e61c40e98dd367a58130bf03da54049 +0 -0
  35. data/dg-api-gem/.git/objects/3a/1638bae7dad86132067c651430a23e0bd00e94 +0 -0
  36. data/dg-api-gem/.git/objects/3f/dd745b1670cfd8137ed8d9601576c4c55011ca +0 -0
  37. data/dg-api-gem/.git/objects/40/7a612dc315ab5a363898a2f26c5f40406509c3 +0 -0
  38. data/dg-api-gem/.git/objects/44/b1fa84f3fdb596e5aa3be4842fafa6d4265007 +4 -0
  39. data/dg-api-gem/.git/objects/45/3cc136420e8bf8c26ad9a87676e684d011ff8f +2 -0
  40. data/dg-api-gem/.git/objects/4a/ac7c8a0faa701839f79f09f55a7d1087973b2a +0 -0
  41. data/dg-api-gem/.git/objects/4d/389bcc61ad278452415941088a4b5dce2d9e0d +0 -0
  42. data/dg-api-gem/.git/objects/52/2134fcdd3a3416faa5a8d1f1d7cf7eed7614a6 +0 -0
  43. data/dg-api-gem/.git/objects/53/e744e7af409f7e3dbbd67104da92c4fb0af2cd +0 -0
  44. data/dg-api-gem/.git/objects/59/832d27043d158a93887128fa62d436e6baf984 +0 -0
  45. data/dg-api-gem/.git/objects/63/965c44c0baa07e6398ed661798c4cdab144a51 +0 -0
  46. data/dg-api-gem/.git/objects/67/0889ef241c30f1eaa968ce274bb30c4ef2c04a +0 -0
  47. data/dg-api-gem/.git/objects/6e/8ed714c65008dbe2d96f1c7c95701ec628687d +0 -0
  48. data/dg-api-gem/.git/objects/7c/5ec222d1a0d401230d65a4f4c95932b6a4b103 +0 -0
  49. data/dg-api-gem/.git/objects/7d/e4768355b175138f4f328f538172371ff899b1 +0 -0
  50. data/dg-api-gem/.git/objects/7e/44b9aade1a985405320127e7b8c87731e2eb47 +0 -0
  51. data/dg-api-gem/.git/objects/83/e16f80447460c937aeaa44a64d743b27863077 +0 -0
  52. data/dg-api-gem/.git/objects/84/c03b075cc3e55d7c9c7a6408a479a432177ca1 +0 -0
  53. data/dg-api-gem/.git/objects/86/b79fcbf184cf40d3762feaa411e60971c9e4e3 +0 -0
  54. data/dg-api-gem/.git/objects/87/7efadd49fbd5ceeaa984d04ace0ff9929e544d +0 -0
  55. data/dg-api-gem/.git/objects/89/6ed529d66fa93deb04e710c6783813865b6c9a +0 -0
  56. data/dg-api-gem/.git/objects/8d/ada3edaf50dbc082c9a125058f25def75e625a +0 -0
  57. data/dg-api-gem/.git/objects/8e/d5d3491bfa2cba6c326f7c4c39e7ae3ac293fd +0 -0
  58. data/dg-api-gem/.git/objects/8f/a369451059baeee34e63568bdf97fa6649b417 +0 -0
  59. data/dg-api-gem/.git/objects/90/0bf41963dbe86e075fb6b2faa712ff54f06b31 +0 -0
  60. data/dg-api-gem/.git/objects/9b/5962c43f3c1628136292953e48ade70023fad1 +0 -0
  61. data/dg-api-gem/.git/objects/9c/3aa7b315f9f3501dbf48e049d87edaa4adfa7a +0 -0
  62. data/dg-api-gem/.git/objects/9e/22e96e9a55c296ac7111f034728eb06138985a +0 -0
  63. data/dg-api-gem/.git/objects/a0/1e0717b62bac403347a6de50cdbbfc7d00807e +0 -0
  64. data/dg-api-gem/.git/objects/a7/1cc8489d2347a27ea0f9e16f515394cbc13e0d +0 -0
  65. data/dg-api-gem/.git/objects/a8/4b30dba8dab3b105c6f730e46e4b75c25dfbcc +0 -0
  66. data/dg-api-gem/.git/objects/ab/a4ce8ed5919657e2645381b0b7ef9249f53fe1 +3 -0
  67. data/dg-api-gem/.git/objects/ac/398d23b9a339730fc96b080f971ac907c7182e +0 -0
  68. data/dg-api-gem/.git/objects/b0/a30dc2224d9fe5a8e2f676564df60d969d6d4e +0 -0
  69. data/dg-api-gem/.git/objects/b1/4d886e6905ad18c7c760475534846b3834c932 +0 -0
  70. data/dg-api-gem/.git/objects/b4/367529bfbbd23d20fd7288ab76af25069d7be7 +0 -0
  71. data/dg-api-gem/.git/objects/b5/f9c09bc0be51297f7e5eba90e95589467ed2ca +0 -0
  72. data/dg-api-gem/.git/objects/b5/fdfa522d17775e3341e8d233e8e4f55251808b +5 -0
  73. data/dg-api-gem/.git/objects/bd/0b6f2d0c50fcf68aa3d43d0562514ed7c11839 +0 -0
  74. data/dg-api-gem/.git/objects/c5/021ce290feadd7ddb909b63666817ea783870b +0 -0
  75. data/dg-api-gem/.git/objects/c5/fa491b4c557bf997d5dd21797de782545dc9e5 +0 -0
  76. data/dg-api-gem/.git/objects/c6/64a5c35f3b1cf84fc1cfb022636e53c87f49a9 +0 -0
  77. data/dg-api-gem/.git/objects/ca/5c84f7caed579535ec2ebb73ceacdf041290d8 +0 -0
  78. data/dg-api-gem/.git/objects/ca/838f54c26c102dae6df4ef6c1beeebac477596 +0 -0
  79. data/dg-api-gem/.git/objects/d3/8f460818b162c188f9636fffe6f6a157fbc095 +0 -0
  80. data/dg-api-gem/.git/objects/dc/8e7a8f5fba4cca72485aa7a1028987ef59c031 +0 -0
  81. data/dg-api-gem/.git/objects/dd/d925f300d40fcf0cbf2b59f4b11ccb730d4864 +0 -0
  82. data/dg-api-gem/.git/objects/df/1709db06c3bea79dee47248616a7f567afa30a +0 -0
  83. data/dg-api-gem/.git/objects/e1/9985758c5d7a2b54e202f423037f2a6b604ce5 +0 -0
  84. data/dg-api-gem/.git/objects/e8/45e5428feb9d46ae1e008ac949956899959d11 +0 -0
  85. data/dg-api-gem/.git/objects/ec/f75a817b10d82816a6d63748ebc5b72998cefa +0 -0
  86. data/dg-api-gem/.git/objects/f0/c34e8b8e645810912715da0e2bde549714076b +0 -0
  87. data/dg-api-gem/.git/objects/f5/86703d84a4a48f2e867b60438f62c2b0d9bbfb +0 -0
  88. data/dg-api-gem/.git/objects/fb/f7ae21827a758fd71109af06f5ec641dd235d7 +0 -0
  89. data/dg-api-gem/.git/objects/ff/f26559d7a990d7527cc4791b091a541df33dc4 +0 -0
  90. data/dg-api-gem/.git/packed-refs +2 -0
  91. data/dg-api-gem/.git/refs/heads/master +1 -0
  92. data/dg-api-gem/.git/refs/remotes/origin/HEAD +1 -0
  93. data/dg-api-gem/.gitignore +50 -0
  94. data/dg-api-gem/.rspec +2 -0
  95. data/dg-api-gem/.swagger-codegen-ignore +23 -0
  96. data/{LICENSE → dg-api-gem/LICENSE} +0 -0
  97. data/{README.md → dg-api-gem/README.md} +33 -5
  98. data/{dock_genius_api_ruby_client.gemspec → dg-api-gem/dock_genius_api_ruby_client.gemspec} +0 -0
  99. data/{docs → dg-api-gem/docs}/AccessToken.md +0 -0
  100. data/{docs → dg-api-gem/docs}/Address.md +0 -0
  101. data/{docs → dg-api-gem/docs}/Customer.md +0 -0
  102. data/{docs → dg-api-gem/docs}/CustomerApi.md +0 -0
  103. data/{docs → dg-api-gem/docs}/Dock.md +4 -3
  104. data/{docs → dg-api-gem/docs}/DockApi.md +345 -0
  105. data/{docs → dg-api-gem/docs}/EmailAddress.md +0 -0
  106. data/{docs → dg-api-gem/docs}/GeoPoint.md +0 -0
  107. data/{docs → dg-api-gem/docs}/InlineResponse200.md +0 -0
  108. data/{docs → dg-api-gem/docs}/InlineResponse2001.md +0 -0
  109. data/{docs → dg-api-gem/docs}/InlineResponse2002.md +0 -0
  110. data/{docs → dg-api-gem/docs}/ListingAgent.md +2 -1
  111. data/{docs → dg-api-gem/docs}/Marina.md +0 -0
  112. data/{docs → dg-api-gem/docs}/MarinaApi.md +0 -0
  113. data/dg-api-gem/docs/Parameter.md +11 -0
  114. data/dg-api-gem/docs/ParameterApi.md +437 -0
  115. data/dg-api-gem/docs/ParameterAssignment.md +10 -0
  116. data/{docs → dg-api-gem/docs}/Phone.md +0 -0
  117. data/dg-api-gem/docs/UnitOfMeasurement.md +10 -0
  118. data/dg-api-gem/docs/UnitOfMeasurementApi.md +437 -0
  119. data/{git_push.sh → dg-api-gem/git_push.sh} +0 -0
  120. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/api/customer_api.rb +0 -0
  121. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/api/dock_api.rb +419 -0
  122. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/api/marina_api.rb +0 -0
  123. data/dg-api-gem/lib/dock_genius_api_ruby_client/api/parameter_api.rb +548 -0
  124. data/dg-api-gem/lib/dock_genius_api_ruby_client/api/unit_of_measurement_api.rb +548 -0
  125. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/api_client.rb +0 -0
  126. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/api_error.rb +0 -0
  127. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/configuration.rb +0 -0
  128. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/access_token.rb +0 -0
  129. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/address.rb +0 -0
  130. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/customer.rb +0 -0
  131. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/dock.rb +20 -4
  132. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/email_address.rb +0 -0
  133. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/geo_point.rb +0 -0
  134. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/inline_response_200.rb +0 -0
  135. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/inline_response_200_1.rb +0 -0
  136. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/inline_response_200_2.rb +0 -0
  137. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/listing_agent.rb +12 -1
  138. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/marina.rb +0 -0
  139. data/dg-api-gem/lib/dock_genius_api_ruby_client/models/parameter.rb +231 -0
  140. data/dg-api-gem/lib/dock_genius_api_ruby_client/models/parameter_assignment.rb +218 -0
  141. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/models/phone.rb +0 -0
  142. data/dg-api-gem/lib/dock_genius_api_ruby_client/models/unit_of_measurement.rb +220 -0
  143. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client/version.rb +1 -1
  144. data/{lib → dg-api-gem/lib}/dock_genius_api_ruby_client.rb +5 -0
  145. data/{spec → dg-api-gem/spec}/api/customer_api_spec.rb +0 -0
  146. data/{spec → dg-api-gem/spec}/api/dock_api_spec.rb +0 -0
  147. data/{spec → dg-api-gem/spec}/api/marina_api_spec.rb +0 -0
  148. data/dg-api-gem/spec/api/parameter_api_spec.rb +157 -0
  149. data/dg-api-gem/spec/api/unit_of_measurement_api_spec.rb +157 -0
  150. data/{spec → dg-api-gem/spec}/api_client_spec.rb +0 -0
  151. data/{spec → dg-api-gem/spec}/configuration_spec.rb +0 -0
  152. data/{spec → dg-api-gem/spec}/models/access_token_spec.rb +0 -0
  153. data/{spec → dg-api-gem/spec}/models/address_spec.rb +0 -0
  154. data/{spec → dg-api-gem/spec}/models/customer_spec.rb +0 -0
  155. data/{spec → dg-api-gem/spec}/models/dock_spec.rb +0 -0
  156. data/{spec → dg-api-gem/spec}/models/email_address_spec.rb +0 -0
  157. data/{spec → dg-api-gem/spec}/models/geo_point_spec.rb +0 -0
  158. data/{spec → dg-api-gem/spec}/models/inline_response_200_1_spec.rb +0 -0
  159. data/{spec → dg-api-gem/spec}/models/inline_response_200_2_spec.rb +0 -0
  160. data/{spec → dg-api-gem/spec}/models/inline_response_200_spec.rb +0 -0
  161. data/{spec → dg-api-gem/spec}/models/listing_agent_spec.rb +0 -0
  162. data/{spec → dg-api-gem/spec}/models/marina_spec.rb +0 -0
  163. data/dg-api-gem/spec/models/parameter_assignment_spec.rb +65 -0
  164. data/dg-api-gem/spec/models/parameter_spec.rb +71 -0
  165. data/{spec → dg-api-gem/spec}/models/phone_spec.rb +0 -0
  166. data/dg-api-gem/spec/models/unit_of_measurement_spec.rb +65 -0
  167. data/{spec → dg-api-gem/spec}/spec_helper.rb +0 -0
  168. data/swagger.yml +3075 -0
  169. metadata +170 -78
@@ -26,8 +26,12 @@ require 'date'
26
26
  module DockGeniusApiRubyClient
27
27
 
28
28
  class ListingAgent
29
+ # The name of the listing agent.
29
30
  attr_accessor :name
30
31
 
32
+ # An ID given by the CRM that links this person into the CRM.
33
+ attr_accessor :crm_id
34
+
31
35
  attr_accessor :id
32
36
 
33
37
  attr_accessor :contact_address
@@ -41,6 +45,7 @@ module DockGeniusApiRubyClient
41
45
  def self.attribute_map
42
46
  {
43
47
  :'name' => :'name',
48
+ :'crm_id' => :'crmId',
44
49
  :'id' => :'id',
45
50
  :'contact_address' => :'contactAddress',
46
51
  :'email_list' => :'emailList',
@@ -52,6 +57,7 @@ module DockGeniusApiRubyClient
52
57
  def self.swagger_types
53
58
  {
54
59
  :'name' => :'String',
60
+ :'crm_id' => :'String',
55
61
  :'id' => :'String',
56
62
  :'contact_address' => :'Address',
57
63
  :'email_list' => :'Array<EmailAddress>',
@@ -71,6 +77,10 @@ module DockGeniusApiRubyClient
71
77
  self.name = attributes[:'name']
72
78
  end
73
79
 
80
+ if attributes.has_key?(:'crmId')
81
+ self.crm_id = attributes[:'crmId']
82
+ end
83
+
74
84
  if attributes.has_key?(:'id')
75
85
  self.id = attributes[:'id']
76
86
  end
@@ -112,6 +122,7 @@ module DockGeniusApiRubyClient
112
122
  return true if self.equal?(o)
113
123
  self.class == o.class &&
114
124
  name == o.name &&
125
+ crm_id == o.crm_id &&
115
126
  id == o.id &&
116
127
  contact_address == o.contact_address &&
117
128
  email_list == o.email_list &&
@@ -127,7 +138,7 @@ module DockGeniusApiRubyClient
127
138
  # Calculates hash code according to all attributes.
128
139
  # @return [Fixnum] Hash code
129
140
  def hash
130
- [name, id, contact_address, email_list, phone_list].hash
141
+ [name, crm_id, id, contact_address, email_list, phone_list].hash
131
142
  end
132
143
 
133
144
  # Builds the object from hash
@@ -0,0 +1,231 @@
1
+ =begin
2
+ #DockGenius API
3
+
4
+ #No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 0.1.0
7
+ Contact: hi@dockgenius.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require 'date'
25
+
26
+ module DockGeniusApiRubyClient
27
+ # A runtime-defined parameter that describes a dock or a marina.
28
+ class Parameter
29
+ attr_accessor :id
30
+
31
+ attr_accessor :domain
32
+
33
+ attr_accessor :name
34
+
35
+ attr_accessor :allowed_values
36
+
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'id' => :'id',
42
+ :'domain' => :'domain',
43
+ :'name' => :'name',
44
+ :'allowed_values' => :'allowed_values'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+ :'id' => :'String',
52
+ :'domain' => :'String',
53
+ :'name' => :'String',
54
+ :'allowed_values' => :'Array<String>'
55
+ }
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ return unless attributes.is_a?(Hash)
62
+
63
+ # convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
65
+
66
+ if attributes.has_key?(:'id')
67
+ self.id = attributes[:'id']
68
+ end
69
+
70
+ if attributes.has_key?(:'domain')
71
+ self.domain = attributes[:'domain']
72
+ end
73
+
74
+ if attributes.has_key?(:'name')
75
+ self.name = attributes[:'name']
76
+ end
77
+
78
+ if attributes.has_key?(:'allowed_values')
79
+ if (value = attributes[:'allowed_values']).is_a?(Array)
80
+ self.allowed_values = value
81
+ end
82
+ end
83
+
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properies with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ return invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ return false if @id.nil?
97
+ return false if @domain.nil?
98
+ return false if @name.nil?
99
+ return true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ id == o.id &&
108
+ domain == o.domain &&
109
+ name == o.name &&
110
+ allowed_values == o.allowed_values
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 [Fixnum] Hash code
121
+ def hash
122
+ [id, domain, name, allowed_values].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 build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ self.class.swagger_types.each_pair do |key, type|
131
+ if type =~ /^Array<(.*)>/i
132
+ # check to ensure the input is an array given that the the attribute
133
+ # is documented as an array but the input is not
134
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
135
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
136
+ end
137
+ elsif !attributes[self.class.attribute_map[key]].nil?
138
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
139
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
140
+ end
141
+
142
+ self
143
+ end
144
+
145
+ # Deserializes the data based on type
146
+ # @param string type Data type
147
+ # @param string value Value to be deserialized
148
+ # @return [Object] Deserialized data
149
+ def _deserialize(type, value)
150
+ case type.to_sym
151
+ when :DateTime
152
+ DateTime.parse(value)
153
+ when :Date
154
+ Date.parse(value)
155
+ when :String
156
+ value.to_s
157
+ when :Integer
158
+ value.to_i
159
+ when :Float
160
+ value.to_f
161
+ when :BOOLEAN
162
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
163
+ true
164
+ else
165
+ false
166
+ end
167
+ when :Object
168
+ # generic object (usually a Hash), return directly
169
+ value
170
+ when /\AArray<(?<inner_type>.+)>\z/
171
+ inner_type = Regexp.last_match[:inner_type]
172
+ value.map { |v| _deserialize(inner_type, v) }
173
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
174
+ k_type = Regexp.last_match[:k_type]
175
+ v_type = Regexp.last_match[:v_type]
176
+ {}.tap do |hash|
177
+ value.each do |k, v|
178
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
179
+ end
180
+ end
181
+ else # model
182
+ temp_model = DockGeniusApiRubyClient.const_get(type).new
183
+ temp_model.build_from_hash(value)
184
+ end
185
+ end
186
+
187
+ # Returns the string representation of the object
188
+ # @return [String] String presentation of the object
189
+ def to_s
190
+ to_hash.to_s
191
+ end
192
+
193
+ # to_body is an alias to to_hash (backward compatibility)
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_body
196
+ to_hash
197
+ end
198
+
199
+ # Returns the object in the form of hash
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ next if value.nil?
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Outputs non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ # @param [Object] value Any valid value
214
+ # @return [Hash] Returns the value in the form of hash
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map{ |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+
229
+ end
230
+
231
+ end
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #DockGenius API
3
+
4
+ #No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 0.1.0
7
+ Contact: hi@dockgenius.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require 'date'
25
+
26
+ module DockGeniusApiRubyClient
27
+ # This class describes a specific value assigned to a parameter.
28
+ class ParameterAssignment
29
+ attr_accessor :value
30
+
31
+ attr_accessor :id
32
+
33
+ attr_accessor :_parameter
34
+
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'value' => :'value',
40
+ :'id' => :'id',
41
+ :'_parameter' => :'_parameter'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.swagger_types
47
+ {
48
+ :'value' => :'Float',
49
+ :'id' => :'String',
50
+ :'_parameter' => :'Parameter'
51
+ }
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ return unless attributes.is_a?(Hash)
58
+
59
+ # convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
61
+
62
+ if attributes.has_key?(:'value')
63
+ self.value = attributes[:'value']
64
+ end
65
+
66
+ if attributes.has_key?(:'id')
67
+ self.id = attributes[:'id']
68
+ end
69
+
70
+ if attributes.has_key?(:'_parameter')
71
+ self._parameter = attributes[:'_parameter']
72
+ end
73
+
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properies with the reasons
78
+ def list_invalid_properties
79
+ invalid_properties = Array.new
80
+ return invalid_properties
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ def valid?
86
+ return false if @value.nil?
87
+ return true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ value == o.value &&
96
+ id == o.id &&
97
+ _parameter == o._parameter
98
+ end
99
+
100
+ # @see the `==` method
101
+ # @param [Object] Object to be compared
102
+ def eql?(o)
103
+ self == o
104
+ end
105
+
106
+ # Calculates hash code according to all attributes.
107
+ # @return [Fixnum] Hash code
108
+ def hash
109
+ [value, id, _parameter].hash
110
+ end
111
+
112
+ # Builds the object from hash
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ # @return [Object] Returns the model itself
115
+ def build_from_hash(attributes)
116
+ return nil unless attributes.is_a?(Hash)
117
+ self.class.swagger_types.each_pair do |key, type|
118
+ if type =~ /^Array<(.*)>/i
119
+ # check to ensure the input is an array given that the the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
122
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
123
+ end
124
+ elsif !attributes[self.class.attribute_map[key]].nil?
125
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
126
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
127
+ end
128
+
129
+ self
130
+ end
131
+
132
+ # Deserializes the data based on type
133
+ # @param string type Data type
134
+ # @param string value Value to be deserialized
135
+ # @return [Object] Deserialized data
136
+ def _deserialize(type, value)
137
+ case type.to_sym
138
+ when :DateTime
139
+ DateTime.parse(value)
140
+ when :Date
141
+ Date.parse(value)
142
+ when :String
143
+ value.to_s
144
+ when :Integer
145
+ value.to_i
146
+ when :Float
147
+ value.to_f
148
+ when :BOOLEAN
149
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
150
+ true
151
+ else
152
+ false
153
+ end
154
+ when :Object
155
+ # generic object (usually a Hash), return directly
156
+ value
157
+ when /\AArray<(?<inner_type>.+)>\z/
158
+ inner_type = Regexp.last_match[:inner_type]
159
+ value.map { |v| _deserialize(inner_type, v) }
160
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
161
+ k_type = Regexp.last_match[:k_type]
162
+ v_type = Regexp.last_match[:v_type]
163
+ {}.tap do |hash|
164
+ value.each do |k, v|
165
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
166
+ end
167
+ end
168
+ else # model
169
+ temp_model = DockGeniusApiRubyClient.const_get(type).new
170
+ temp_model.build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ next if value.nil?
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map{ |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ end
217
+
218
+ end