wallee-ruby-sdk 2.2.5 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wallee-ruby-sdk.rb +22 -2
  3. data/lib/wallee-ruby-sdk/api/bank_account_service_api.rb +213 -0
  4. data/lib/wallee-ruby-sdk/api/bank_transaction_service_api.rb +213 -0
  5. data/lib/wallee-ruby-sdk/api/currency_bank_account_service_api.rb +213 -0
  6. data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +71 -0
  7. data/lib/wallee-ruby-sdk/api/shopify_subscriber_service_api.rb +62 -0
  8. data/lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb +21 -32
  9. data/lib/wallee-ruby-sdk/api/web_app_service_api.rb +200 -0
  10. data/lib/wallee-ruby-sdk/models/authenticated_card_data.rb +221 -0
  11. data/lib/wallee-ruby-sdk/models/{unencrypted_card_data.rb → authenticated_card_data_create.rb} +86 -12
  12. data/lib/wallee-ruby-sdk/models/card_authentication_response.rb +38 -0
  13. data/lib/wallee-ruby-sdk/models/card_authentication_version.rb +35 -0
  14. data/lib/wallee-ruby-sdk/models/card_cryptogram.rb +201 -0
  15. data/lib/wallee-ruby-sdk/models/card_cryptogram_create.rb +211 -0
  16. data/lib/wallee-ruby-sdk/models/card_cryptogram_type.rb +34 -0
  17. data/lib/wallee-ruby-sdk/models/cardholder_authentication.rb +231 -0
  18. data/lib/wallee-ruby-sdk/models/cardholder_authentication_create.rb +241 -0
  19. data/lib/wallee-ruby-sdk/models/charge_bank_transaction.rb +1 -1
  20. data/lib/wallee-ruby-sdk/models/payment_terminal.rb +11 -1
  21. data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb +11 -1
  22. data/lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb +215 -0
  23. data/lib/wallee-ruby-sdk/models/permission.rb +14 -4
  24. data/lib/wallee-ruby-sdk/models/recurring_indicator.rb +37 -0
  25. data/lib/wallee-ruby-sdk/models/refund_bank_transaction.rb +1 -1
  26. data/lib/wallee-ruby-sdk/models/refund_recovery_bank_transaction.rb +1 -1
  27. data/lib/wallee-ruby-sdk/models/rendered_terminal_receipt.rb +26 -6
  28. data/lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb +241 -0
  29. data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +11 -1
  30. data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +11 -1
  31. data/lib/wallee-ruby-sdk/models/subscription_product_component.rb +1 -1
  32. data/lib/wallee-ruby-sdk/models/subscription_product_component_update.rb +1 -1
  33. data/lib/wallee-ruby-sdk/models/tax_calculation.rb +2 -2
  34. data/lib/wallee-ruby-sdk/models/terminal_receipt_fetch_request.rb +221 -0
  35. data/lib/wallee-ruby-sdk/models/terminal_receipt_format.rb +35 -0
  36. data/lib/wallee-ruby-sdk/models/tokenized_card_data.rb +211 -0
  37. data/lib/wallee-ruby-sdk/models/{unencrypted_card_data_create.rb → tokenized_card_data_create.rb} +60 -5
  38. data/lib/wallee-ruby-sdk/models/web_app_confirmation_request.rb +206 -0
  39. data/lib/wallee-ruby-sdk/models/web_app_confirmation_response.rb +231 -0
  40. data/lib/wallee-ruby-sdk/models/webhook_url.rb +11 -1
  41. data/lib/wallee-ruby-sdk/version.rb +1 -1
  42. metadata +24 -4
@@ -80,7 +80,7 @@ module Wallee
80
80
  :'completion' => :'Integer',
81
81
  :'language' => :'String',
82
82
  :'space_view_id' => :'Integer',
83
- :'transaction' => :'Integer',
83
+ :'transaction' => :'Transaction',
84
84
  :'transaction_currency_amount' => :'Float',
85
85
  :'transaction_currency_value_amount' => :'Float',
86
86
  :'version' => :'Integer'
@@ -23,6 +23,9 @@ module Wallee
23
23
  #
24
24
  attr_accessor :configuration_version
25
25
 
26
+ #
27
+ attr_accessor :default_currency
28
+
26
29
  # The ID is the primary key of the entity. The ID identifies the entity uniquely.
27
30
  attr_accessor :id
28
31
 
@@ -54,6 +57,7 @@ module Wallee
54
57
  def self.attribute_map
55
58
  {
56
59
  :'configuration_version' => :'configurationVersion',
60
+ :'default_currency' => :'defaultCurrency',
57
61
  :'id' => :'id',
58
62
  :'identifier' => :'identifier',
59
63
  :'linked_space_id' => :'linkedSpaceId',
@@ -70,6 +74,7 @@ module Wallee
70
74
  def self.swagger_types
71
75
  {
72
76
  :'configuration_version' => :'PaymentTerminalConfigurationVersion',
77
+ :'default_currency' => :'String',
73
78
  :'id' => :'Integer',
74
79
  :'identifier' => :'String',
75
80
  :'linked_space_id' => :'Integer',
@@ -94,6 +99,10 @@ module Wallee
94
99
  self.configuration_version = attributes[:'configurationVersion']
95
100
  end
96
101
 
102
+ if attributes.has_key?(:'defaultCurrency')
103
+ self.default_currency = attributes[:'defaultCurrency']
104
+ end
105
+
97
106
  if attributes.has_key?(:'id')
98
107
  self.id = attributes[:'id']
99
108
  end
@@ -165,6 +174,7 @@ module Wallee
165
174
  return true if self.equal?(o)
166
175
  self.class == o.class &&
167
176
  configuration_version == o.configuration_version &&
177
+ default_currency == o.default_currency &&
168
178
  id == o.id &&
169
179
  identifier == o.identifier &&
170
180
  linked_space_id == o.linked_space_id &&
@@ -185,7 +195,7 @@ module Wallee
185
195
  # Calculates hash code according to all attributes.
186
196
  # @return [Fixnum] Hash code
187
197
  def hash
188
- [configuration_version, id, identifier, linked_space_id, location_version, name, planned_purge_date, state, type, version].hash
198
+ [configuration_version, default_currency, id, identifier, linked_space_id, location_version, name, planned_purge_date, state, type, version].hash
189
199
  end
190
200
 
191
201
  # Builds the object from hash
@@ -32,6 +32,9 @@ module Wallee
32
32
  # The created on date indicates the date on which the entity was stored into the database.
33
33
  attr_accessor :created_on
34
34
 
35
+ # The currency is derived by default from the terminal location. By setting a specific currency the derived currency is overridden.
36
+ attr_accessor :default_currency
37
+
35
38
  # The ID is the primary key of the entity. The ID identifies the entity uniquely.
36
39
  attr_accessor :id
37
40
 
@@ -66,6 +69,7 @@ module Wallee
66
69
  :'connector_configurations' => :'connectorConfigurations',
67
70
  :'created_by' => :'createdBy',
68
71
  :'created_on' => :'createdOn',
72
+ :'default_currency' => :'defaultCurrency',
69
73
  :'id' => :'id',
70
74
  :'linked_space_id' => :'linkedSpaceId',
71
75
  :'maintenance_window_duration' => :'maintenanceWindowDuration',
@@ -85,6 +89,7 @@ module Wallee
85
89
  :'connector_configurations' => :'Array<Integer>',
86
90
  :'created_by' => :'Integer',
87
91
  :'created_on' => :'DateTime',
92
+ :'default_currency' => :'String',
88
93
  :'id' => :'Integer',
89
94
  :'linked_space_id' => :'Integer',
90
95
  :'maintenance_window_duration' => :'String',
@@ -123,6 +128,10 @@ module Wallee
123
128
  self.created_on = attributes[:'createdOn']
124
129
  end
125
130
 
131
+ if attributes.has_key?(:'defaultCurrency')
132
+ self.default_currency = attributes[:'defaultCurrency']
133
+ end
134
+
126
135
  if attributes.has_key?(:'id')
127
136
  self.id = attributes[:'id']
128
137
  end
@@ -182,6 +191,7 @@ module Wallee
182
191
  connector_configurations == o.connector_configurations &&
183
192
  created_by == o.created_by &&
184
193
  created_on == o.created_on &&
194
+ default_currency == o.default_currency &&
185
195
  id == o.id &&
186
196
  linked_space_id == o.linked_space_id &&
187
197
  maintenance_window_duration == o.maintenance_window_duration &&
@@ -202,7 +212,7 @@ module Wallee
202
212
  # Calculates hash code according to all attributes.
203
213
  # @return [Fixnum] Hash code
204
214
  def hash
205
- [configuration, connector_configurations, created_by, created_on, id, linked_space_id, maintenance_window_duration, maintenance_window_start, planned_purge_date, state, time_zone, version, version_applied_immediately].hash
215
+ [configuration, connector_configurations, created_by, created_on, default_currency, id, linked_space_id, maintenance_window_duration, maintenance_window_start, planned_purge_date, state, time_zone, version, version_applied_immediately].hash
206
216
  end
207
217
 
208
218
  # Builds the object from hash
@@ -0,0 +1,215 @@
1
+ =begin
2
+ The wallee API allows an easy interaction with the wallee web service.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ =end
17
+
18
+ require 'date'
19
+
20
+ module Wallee
21
+ #
22
+ class PaymentTerminalReceiptType
23
+ #
24
+ attr_accessor :description
25
+
26
+ # The ID is the primary key of the entity. The ID identifies the entity uniquely.
27
+ attr_accessor :id
28
+
29
+ #
30
+ attr_accessor :name
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'description' => :'description',
36
+ :'id' => :'id',
37
+ :'name' => :'name'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.swagger_types
43
+ {
44
+ :'description' => :'Hash<String, String>',
45
+ :'id' => :'Integer',
46
+ :'name' => :'Hash<String, String>'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
+
58
+ if attributes.has_key?(:'description')
59
+ if (value = attributes[:'description']).is_a?(Hash)
60
+ self.description = value
61
+ end
62
+ end
63
+
64
+ if attributes.has_key?(:'id')
65
+ self.id = attributes[:'id']
66
+ end
67
+
68
+ if attributes.has_key?(:'name')
69
+ if (value = attributes[:'name']).is_a?(Hash)
70
+ self.name = 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
+ description == o.description &&
94
+ id == o.id &&
95
+ name == o.name
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Fixnum] Hash code
106
+ def hash
107
+ [description, id, name].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ self.class.swagger_types.each_pair do |key, type|
116
+ if type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
120
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
121
+ end
122
+ elsif !attributes[self.class.attribute_map[key]].nil?
123
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
125
+ end
126
+
127
+ self
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def _deserialize(type, value)
135
+ case type.to_sym
136
+ when :DateTime
137
+ DateTime.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :BOOLEAN
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ temp_model = Wallee.const_get(type).new
168
+ temp_model.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ next if value.nil?
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map{ |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+ end
@@ -50,6 +50,9 @@ module Wallee
50
50
  #
51
51
  attr_accessor :two_factor_required
52
52
 
53
+ #
54
+ attr_accessor :web_app_enabled
55
+
53
56
  # Attribute mapping from ruby-style variable name to JSON key.
54
57
  def self.attribute_map
55
58
  {
@@ -62,7 +65,8 @@ module Wallee
62
65
  :'parent' => :'parent',
63
66
  :'path_to_root' => :'pathToRoot',
64
67
  :'title' => :'title',
65
- :'two_factor_required' => :'twoFactorRequired'
68
+ :'two_factor_required' => :'twoFactorRequired',
69
+ :'web_app_enabled' => :'webAppEnabled'
66
70
  }
67
71
  end
68
72
 
@@ -78,7 +82,8 @@ module Wallee
78
82
  :'parent' => :'Integer',
79
83
  :'path_to_root' => :'Array<Integer>',
80
84
  :'title' => :'Hash<String, String>',
81
- :'two_factor_required' => :'BOOLEAN'
85
+ :'two_factor_required' => :'BOOLEAN',
86
+ :'web_app_enabled' => :'BOOLEAN'
82
87
  }
83
88
  end
84
89
 
@@ -137,6 +142,10 @@ module Wallee
137
142
  if attributes.has_key?(:'twoFactorRequired')
138
143
  self.two_factor_required = attributes[:'twoFactorRequired']
139
144
  end
145
+
146
+ if attributes.has_key?(:'webAppEnabled')
147
+ self.web_app_enabled = attributes[:'webAppEnabled']
148
+ end
140
149
  end
141
150
 
142
151
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -166,7 +175,8 @@ module Wallee
166
175
  parent == o.parent &&
167
176
  path_to_root == o.path_to_root &&
168
177
  title == o.title &&
169
- two_factor_required == o.two_factor_required
178
+ two_factor_required == o.two_factor_required &&
179
+ web_app_enabled == o.web_app_enabled
170
180
  end
171
181
 
172
182
  # @see the `==` method
@@ -178,7 +188,7 @@ module Wallee
178
188
  # Calculates hash code according to all attributes.
179
189
  # @return [Fixnum] Hash code
180
190
  def hash
181
- [description, feature, group, id, leaf, name, parent, path_to_root, title, two_factor_required].hash
191
+ [description, feature, group, id, leaf, name, parent, path_to_root, title, two_factor_required, web_app_enabled].hash
182
192
  end
183
193
 
184
194
  # Builds the object from hash
@@ -0,0 +1,37 @@
1
+ =begin
2
+ The wallee API allows an easy interaction with the wallee web service.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ =end
17
+
18
+ require 'date'
19
+
20
+ module Wallee
21
+ class RecurringIndicator
22
+
23
+ REGULAR_TRANSACTION = 'REGULAR_TRANSACTION'.freeze
24
+ INITIAL_RECURRING_TRANSACTION = 'INITIAL_RECURRING_TRANSACTION'.freeze
25
+ MERCHANT_INITIATED_RECURRING_TRANSACTION = 'MERCHANT_INITIATED_RECURRING_TRANSACTION'.freeze
26
+ CUSTOMER_INITIATED_RECURRING_TRANSACTION = 'CUSTOMER_INITIATED_RECURRING_TRANSACTION'.freeze
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ constantValues = RecurringIndicator.constants.select { |c| RecurringIndicator::const_get(c) == value }
33
+ raise "Invalid ENUM value #{value} for class #RecurringIndicator" if constantValues.empty?
34
+ value
35
+ end
36
+ end
37
+ end
@@ -74,7 +74,7 @@ module Wallee
74
74
  :'linked_transaction' => :'Integer',
75
75
  :'bank_transaction' => :'BankTransaction',
76
76
  :'language' => :'String',
77
- :'refund' => :'Integer',
77
+ :'refund' => :'Refund',
78
78
  :'refund_currency_amount' => :'Float',
79
79
  :'refund_currency_value_amount' => :'Float',
80
80
  :'space_view_id' => :'Integer',
@@ -79,7 +79,7 @@ module Wallee
79
79
  :'bank_transaction' => :'BankTransaction',
80
80
  :'language' => :'String',
81
81
  :'line_items' => :'Array<LineItem>',
82
- :'refund' => :'Integer',
82
+ :'refund' => :'Refund',
83
83
  :'refund_currency_amount' => :'Float',
84
84
  :'refund_currency_value_amount' => :'Float',
85
85
  :'space_view_id' => :'Integer',
@@ -20,17 +20,25 @@ require 'date'
20
20
  module Wallee
21
21
  #
22
22
  class RenderedTerminalReceipt
23
- #
23
+ # The data property contains the binary data of the receipt document encoded as base 64 encoded string.
24
24
  attr_accessor :data
25
25
 
26
- #
26
+ # The mime type indicates the format of the receipt document. The mime type depends on the requested receipt format.
27
27
  attr_accessor :mime_type
28
28
 
29
+ # The terminal might or might not print the receipt. This property is set to true when the configuration of the terminal forces the printing and the device supports the receipt printing.
30
+ attr_accessor :printed
31
+
32
+ # Each receipt has a different usage. The receipt type indicates for what resp. for whom the document is for.
33
+ attr_accessor :receipt_type
34
+
29
35
  # Attribute mapping from ruby-style variable name to JSON key.
30
36
  def self.attribute_map
31
37
  {
32
38
  :'data' => :'data',
33
- :'mime_type' => :'mimeType'
39
+ :'mime_type' => :'mimeType',
40
+ :'printed' => :'printed',
41
+ :'receipt_type' => :'receiptType'
34
42
  }
35
43
  end
36
44
 
@@ -38,7 +46,9 @@ module Wallee
38
46
  def self.swagger_types
39
47
  {
40
48
  :'data' => :'Array<String>',
41
- :'mime_type' => :'String'
49
+ :'mime_type' => :'String',
50
+ :'printed' => :'BOOLEAN',
51
+ :'receipt_type' => :'PaymentTerminalReceiptType'
42
52
  }
43
53
  end
44
54
 
@@ -59,6 +69,14 @@ module Wallee
59
69
  if attributes.has_key?(:'mimeType')
60
70
  self.mime_type = attributes[:'mimeType']
61
71
  end
72
+
73
+ if attributes.has_key?(:'printed')
74
+ self.printed = attributes[:'printed']
75
+ end
76
+
77
+ if attributes.has_key?(:'receiptType')
78
+ self.receipt_type = attributes[:'receiptType']
79
+ end
62
80
  end
63
81
 
64
82
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -80,7 +98,9 @@ module Wallee
80
98
  return true if self.equal?(o)
81
99
  self.class == o.class &&
82
100
  data == o.data &&
83
- mime_type == o.mime_type
101
+ mime_type == o.mime_type &&
102
+ printed == o.printed &&
103
+ receipt_type == o.receipt_type
84
104
  end
85
105
 
86
106
  # @see the `==` method
@@ -92,7 +112,7 @@ module Wallee
92
112
  # Calculates hash code according to all attributes.
93
113
  # @return [Fixnum] Hash code
94
114
  def hash
95
- [data, mime_type].hash
115
+ [data, mime_type, printed, receipt_type].hash
96
116
  end
97
117
 
98
118
  # Builds the object from hash