pcp-server-ruby-sdk 1.6.0 → 1.8.0

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/api-definition.yaml +5012 -4842
  4. data/lib/PCP-server-Ruby-SDK/models/apple_payment_data_token_header_information.rb +2 -0
  5. data/lib/PCP-server-Ruby-SDK/models/apple_payment_data_token_information.rb +6 -0
  6. data/lib/PCP-server-Ruby-SDK/models/bank_account_information.rb +0 -2
  7. data/lib/PCP-server-Ruby-SDK/models/bank_payout_method_specific_input.rb +0 -4
  8. data/lib/PCP-server-Ruby-SDK/models/cancel_payment_request.rb +8 -0
  9. data/lib/PCP-server-Ruby-SDK/models/capture_payment_request.rb +13 -4
  10. data/lib/PCP-server-Ruby-SDK/models/capture_payment_response.rb +13 -4
  11. data/lib/PCP-server-Ruby-SDK/models/cart_item_input.rb +13 -4
  12. data/lib/PCP-server-Ruby-SDK/models/cart_item_patch.rb +13 -4
  13. data/lib/PCP-server-Ruby-SDK/models/cart_item_result.rb +13 -4
  14. data/lib/PCP-server-Ruby-SDK/models/cart_item_supplier_references.rb +200 -0
  15. data/lib/PCP-server-Ruby-SDK/models/complete_order_request.rb +187 -0
  16. data/lib/PCP-server-Ruby-SDK/models/complete_payment_product840_specific_input.rb +2 -0
  17. data/lib/PCP-server-Ruby-SDK/models/create_payment_response.rb +13 -4
  18. data/lib/PCP-server-Ruby-SDK/models/deliver_request.rb +12 -4
  19. data/lib/PCP-server-Ruby-SDK/models/fund_distribution.rb +272 -0
  20. data/lib/PCP-server-Ruby-SDK/models/fund_split.rb +211 -0
  21. data/lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_input.rb +13 -4
  22. data/lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_output.rb +1 -1
  23. data/lib/PCP-server-Ruby-SDK/models/{network.rb → mobile_payment_network.rb} +4 -4
  24. data/lib/PCP-server-Ruby-SDK/models/order_line_details_input.rb +2 -1
  25. data/lib/PCP-server-Ruby-SDK/models/order_line_details_patch.rb +11 -1
  26. data/lib/PCP-server-Ruby-SDK/models/order_line_details_result.rb +11 -1
  27. data/lib/PCP-server-Ruby-SDK/models/order_request.rb +12 -4
  28. data/lib/PCP-server-Ruby-SDK/models/pause_payment_request.rb +5 -38
  29. data/lib/PCP-server-Ruby-SDK/models/payment_event.rb +34 -4
  30. data/lib/PCP-server-Ruby-SDK/models/payment_execution.rb +15 -4
  31. data/lib/PCP-server-Ruby-SDK/models/payment_execution_specific_input.rb +13 -4
  32. data/lib/PCP-server-Ruby-SDK/models/payment_product302_specific_input.rb +1 -1
  33. data/lib/PCP-server-Ruby-SDK/models/payment_product5002_specific_input.rb +209 -0
  34. data/lib/PCP-server-Ruby-SDK/models/payment_references_for_refund.rb +198 -0
  35. data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_input.rb +4 -14
  36. data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_output.rb +4 -14
  37. data/lib/PCP-server-Ruby-SDK/models/refund_payment_response.rb +12 -4
  38. data/lib/PCP-server-Ruby-SDK/models/refund_request.rb +14 -5
  39. data/lib/PCP-server-Ruby-SDK/models/return_request.rb +204 -191
  40. data/lib/PCP-server-Ruby-SDK/transformer/apple_pay_transformer.rb +2 -2
  41. data/lib/PCP-server-Ruby-SDK/version.rb +1 -1
  42. data/lib/PCP-server-Ruby-SDK.rb +7 -1
  43. data/package-lock.json +16 -3
  44. data/package.json +1 -1
  45. data/scripts.sh +2 -2
  46. data/spec/transformer/apple_pay_transformer_spec.rb +1 -1
  47. metadata +13 -7
@@ -55,6 +55,8 @@ module PCPServerSDK
55
55
 
56
56
  if attributes.key?(:'transaction_id')
57
57
  self.transaction_id = attributes[:'transaction_id']
58
+ else
59
+ self.transaction_id = nil
58
60
  end
59
61
 
60
62
  if attributes.key?(:'application_data')
@@ -81,14 +81,20 @@ module PCPServerSDK
81
81
 
82
82
  if attributes.key?(:'version')
83
83
  self.version = attributes[:'version']
84
+ else
85
+ self.version = nil
84
86
  end
85
87
 
86
88
  if attributes.key?(:'signature')
87
89
  self.signature = attributes[:'signature']
90
+ else
91
+ self.signature = nil
88
92
  end
89
93
 
90
94
  if attributes.key?(:'header')
91
95
  self.header = attributes[:'header']
96
+ else
97
+ self.header = nil
92
98
  end
93
99
  end
94
100
 
@@ -72,8 +72,6 @@ module PCPServerSDK
72
72
 
73
73
  if attributes.key?(:'bic')
74
74
  self.bic = attributes[:'bic']
75
- else
76
- self.bic = nil
77
75
  end
78
76
  end
79
77
 
@@ -54,14 +54,10 @@ module PCPServerSDK
54
54
 
55
55
  if attributes.key?(:'payment_product_id')
56
56
  self.payment_product_id = attributes[:'payment_product_id']
57
- else
58
- self.payment_product_id = nil
59
57
  end
60
58
 
61
59
  if attributes.key?(:'payment_product772_specific_input')
62
60
  self.payment_product772_specific_input = attributes[:'payment_product772_specific_input']
63
- else
64
- self.payment_product772_specific_input = nil
65
61
  end
66
62
  end
67
63
 
@@ -73,6 +73,14 @@ module PCPServerSDK
73
73
  end
74
74
  end
75
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
+ cancellation_reason == o.cancellation_reason
82
+ end
83
+
76
84
  # @see the `==` method
77
85
  # @param [Object] Object to be compared
78
86
  def eql?(o)
@@ -17,6 +17,8 @@ module PCPServerSDK
17
17
 
18
18
  attr_accessor :delivery
19
19
 
20
+ attr_accessor :fund_split
21
+
20
22
  class EnumAttributeValidator
21
23
  attr_reader :datatype
22
24
  attr_reader :allowable_values
@@ -46,7 +48,8 @@ module PCPServerSDK
46
48
  :'is_final' => :'isFinal',
47
49
  :'cancellation_reason' => :'cancellationReason',
48
50
  :'references' => :'references',
49
- :'delivery' => :'delivery'
51
+ :'delivery' => :'delivery',
52
+ :'fund_split' => :'fundSplit'
50
53
  }
51
54
  end
52
55
 
@@ -62,7 +65,8 @@ module PCPServerSDK
62
65
  :'is_final' => :'Boolean',
63
66
  :'cancellation_reason' => :'CancellationReason',
64
67
  :'references' => :'PaymentReferences',
65
- :'delivery' => :'DeliveryInformation'
68
+ :'delivery' => :'DeliveryInformation',
69
+ :'fund_split' => :'FundSplit'
66
70
  }
67
71
  end
68
72
 
@@ -108,6 +112,10 @@ module PCPServerSDK
108
112
  if attributes.key?(:'delivery')
109
113
  self.delivery = attributes[:'delivery']
110
114
  end
115
+
116
+ if attributes.key?(:'fund_split')
117
+ self.fund_split = attributes[:'fund_split']
118
+ end
111
119
  end
112
120
 
113
121
  # Checks equality by comparing each attribute.
@@ -119,7 +127,8 @@ module PCPServerSDK
119
127
  is_final == o.is_final &&
120
128
  cancellation_reason == o.cancellation_reason &&
121
129
  references == o.references &&
122
- delivery == o.delivery
130
+ delivery == o.delivery &&
131
+ fund_split == o.fund_split
123
132
  end
124
133
 
125
134
  # @see the `==` method
@@ -131,7 +140,7 @@ module PCPServerSDK
131
140
  # Calculates hash code according to all attributes.
132
141
  # @return [Integer] Hash code
133
142
  def hash
134
- [amount, is_final, cancellation_reason, references, delivery].hash
143
+ [amount, is_final, cancellation_reason, references, delivery, fund_split].hash
135
144
  end
136
145
 
137
146
  # Builds the object from hash
@@ -13,6 +13,8 @@ module PCPServerSDK
13
13
  # Unique payment transaction identifier of the payment gateway.
14
14
  attr_accessor :id
15
15
 
16
+ attr_accessor :fund_split
17
+
16
18
  class EnumAttributeValidator
17
19
  attr_reader :datatype
18
20
  attr_reader :allowable_values
@@ -41,7 +43,8 @@ module PCPServerSDK
41
43
  :'capture_output' => :'captureOutput',
42
44
  :'status' => :'status',
43
45
  :'status_output' => :'statusOutput',
44
- :'id' => :'id'
46
+ :'id' => :'id',
47
+ :'fund_split' => :'fundSplit'
45
48
  }
46
49
  end
47
50
 
@@ -56,7 +59,8 @@ module PCPServerSDK
56
59
  :'capture_output' => :'CaptureOutput',
57
60
  :'status' => :'StatusValue',
58
61
  :'status_output' => :'PaymentStatusOutput',
59
- :'id' => :'String'
62
+ :'id' => :'String',
63
+ :'fund_split' => :'FundSplit'
60
64
  }
61
65
  end
62
66
 
@@ -96,6 +100,10 @@ module PCPServerSDK
96
100
  if attributes.key?(:'id')
97
101
  self.id = attributes[:'id']
98
102
  end
103
+
104
+ if attributes.key?(:'fund_split')
105
+ self.fund_split = attributes[:'fund_split']
106
+ end
99
107
  end
100
108
 
101
109
  # Checks equality by comparing each attribute.
@@ -106,7 +114,8 @@ module PCPServerSDK
106
114
  capture_output == o.capture_output &&
107
115
  status == o.status &&
108
116
  status_output == o.status_output &&
109
- id == o.id
117
+ id == o.id &&
118
+ fund_split == o.fund_split
110
119
  end
111
120
 
112
121
  # @see the `==` method
@@ -118,7 +127,7 @@ module PCPServerSDK
118
127
  # Calculates hash code according to all attributes.
119
128
  # @return [Integer] Hash code
120
129
  def hash
121
- [capture_output, status, status_output, id].hash
130
+ [capture_output, status, status_output, id, fund_split].hash
122
131
  end
123
132
 
124
133
  # Builds the object from hash
@@ -9,11 +9,14 @@ module PCPServerSDK
9
9
 
10
10
  attr_accessor :order_line_details
11
11
 
12
+ attr_accessor :supplier_references
13
+
12
14
  # Attribute mapping from ruby-style variable name to JSON key.
13
15
  def self.attribute_map
14
16
  {
15
17
  :'invoice_data' => :'invoiceData',
16
- :'order_line_details' => :'orderLineDetails'
18
+ :'order_line_details' => :'orderLineDetails',
19
+ :'supplier_references' => :'supplierReferences'
17
20
  }
18
21
  end
19
22
 
@@ -26,7 +29,8 @@ module PCPServerSDK
26
29
  def self.openapi_types
27
30
  {
28
31
  :'invoice_data' => :'CartItemInvoiceData',
29
- :'order_line_details' => :'OrderLineDetailsInput'
32
+ :'order_line_details' => :'OrderLineDetailsInput',
33
+ :'supplier_references' => :'CartItemSupplierReferences'
30
34
  }
31
35
  end
32
36
 
@@ -58,6 +62,10 @@ module PCPServerSDK
58
62
  if attributes.key?(:'order_line_details')
59
63
  self.order_line_details = attributes[:'order_line_details']
60
64
  end
65
+
66
+ if attributes.key?(:'supplier_references')
67
+ self.supplier_references = attributes[:'supplier_references']
68
+ end
61
69
  end
62
70
 
63
71
  # Checks equality by comparing each attribute.
@@ -66,7 +74,8 @@ module PCPServerSDK
66
74
  return true if self.equal?(o)
67
75
  self.class == o.class &&
68
76
  invoice_data == o.invoice_data &&
69
- order_line_details == o.order_line_details
77
+ order_line_details == o.order_line_details &&
78
+ supplier_references == o.supplier_references
70
79
  end
71
80
 
72
81
  # @see the `==` method
@@ -78,7 +87,7 @@ module PCPServerSDK
78
87
  # Calculates hash code according to all attributes.
79
88
  # @return [Integer] Hash code
80
89
  def hash
81
- [invoice_data, order_line_details].hash
90
+ [invoice_data, order_line_details, supplier_references].hash
82
91
  end
83
92
 
84
93
  # Builds the object from hash
@@ -9,11 +9,14 @@ module PCPServerSDK
9
9
 
10
10
  attr_accessor :order_line_details
11
11
 
12
+ attr_accessor :supplier_references
13
+
12
14
  # Attribute mapping from ruby-style variable name to JSON key.
13
15
  def self.attribute_map
14
16
  {
15
17
  :'invoice_data' => :'invoiceData',
16
- :'order_line_details' => :'orderLineDetails'
18
+ :'order_line_details' => :'orderLineDetails',
19
+ :'supplier_references' => :'supplierReferences'
17
20
  }
18
21
  end
19
22
 
@@ -26,7 +29,8 @@ module PCPServerSDK
26
29
  def self.openapi_types
27
30
  {
28
31
  :'invoice_data' => :'CartItemInvoiceData',
29
- :'order_line_details' => :'OrderLineDetailsPatch'
32
+ :'order_line_details' => :'OrderLineDetailsPatch',
33
+ :'supplier_references' => :'CartItemSupplierReferences'
30
34
  }
31
35
  end
32
36
 
@@ -58,6 +62,10 @@ module PCPServerSDK
58
62
  if attributes.key?(:'order_line_details')
59
63
  self.order_line_details = attributes[:'order_line_details']
60
64
  end
65
+
66
+ if attributes.key?(:'supplier_references')
67
+ self.supplier_references = attributes[:'supplier_references']
68
+ end
61
69
  end
62
70
 
63
71
  # Checks equality by comparing each attribute.
@@ -66,7 +74,8 @@ module PCPServerSDK
66
74
  return true if self.equal?(o)
67
75
  self.class == o.class &&
68
76
  invoice_data == o.invoice_data &&
69
- order_line_details == o.order_line_details
77
+ order_line_details == o.order_line_details &&
78
+ supplier_references == o.supplier_references
70
79
  end
71
80
 
72
81
  # @see the `==` method
@@ -78,7 +87,7 @@ module PCPServerSDK
78
87
  # Calculates hash code according to all attributes.
79
88
  # @return [Integer] Hash code
80
89
  def hash
81
- [invoice_data, order_line_details].hash
90
+ [invoice_data, order_line_details, supplier_references].hash
82
91
  end
83
92
 
84
93
  # Builds the object from hash
@@ -9,11 +9,14 @@ module PCPServerSDK
9
9
 
10
10
  attr_accessor :order_line_details
11
11
 
12
+ attr_accessor :supplier_references
13
+
12
14
  # Attribute mapping from ruby-style variable name to JSON key.
13
15
  def self.attribute_map
14
16
  {
15
17
  :'invoice_data' => :'invoiceData',
16
- :'order_line_details' => :'orderLineDetails'
18
+ :'order_line_details' => :'orderLineDetails',
19
+ :'supplier_references' => :'supplierReferences'
17
20
  }
18
21
  end
19
22
 
@@ -26,7 +29,8 @@ module PCPServerSDK
26
29
  def self.openapi_types
27
30
  {
28
31
  :'invoice_data' => :'CartItemInvoiceData',
29
- :'order_line_details' => :'OrderLineDetailsResult'
32
+ :'order_line_details' => :'OrderLineDetailsResult',
33
+ :'supplier_references' => :'CartItemSupplierReferences'
30
34
  }
31
35
  end
32
36
 
@@ -58,6 +62,10 @@ module PCPServerSDK
58
62
  if attributes.key?(:'order_line_details')
59
63
  self.order_line_details = attributes[:'order_line_details']
60
64
  end
65
+
66
+ if attributes.key?(:'supplier_references')
67
+ self.supplier_references = attributes[:'supplier_references']
68
+ end
61
69
  end
62
70
 
63
71
  # Checks equality by comparing each attribute.
@@ -66,7 +74,8 @@ module PCPServerSDK
66
74
  return true if self.equal?(o)
67
75
  self.class == o.class &&
68
76
  invoice_data == o.invoice_data &&
69
- order_line_details == o.order_line_details
77
+ order_line_details == o.order_line_details &&
78
+ supplier_references == o.supplier_references
70
79
  end
71
80
 
72
81
  # @see the `==` method
@@ -78,7 +87,7 @@ module PCPServerSDK
78
87
  # Calculates hash code according to all attributes.
79
88
  # @return [Integer] Hash code
80
89
  def hash
81
- [invoice_data, order_line_details].hash
90
+ [invoice_data, order_line_details, supplier_references].hash
82
91
  end
83
92
 
84
93
  # Builds the object from hash
@@ -0,0 +1,200 @@
1
+
2
+ require 'date'
3
+ require 'time'
4
+
5
+ module PCPServerSDK
6
+ module Models
7
+ # This object contains references of the seller of the cart item.
8
+ class CartItemSupplierReferences
9
+ # Unique identifier for the supplier.
10
+ attr_accessor :supplier_id
11
+
12
+ # Reference of the order for the supplier.
13
+ attr_accessor :order_reference
14
+
15
+ # Attribute mapping from ruby-style variable name to JSON key.
16
+ def self.attribute_map
17
+ {
18
+ :'supplier_id' => :'supplierId',
19
+ :'order_reference' => :'orderReference'
20
+ }
21
+ end
22
+
23
+ # Returns all the JSON keys this model knows about
24
+ def self.acceptable_attributes
25
+ attribute_map.values
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.openapi_types
30
+ {
31
+ :'supplier_id' => :'String',
32
+ :'order_reference' => :'String'
33
+ }
34
+ end
35
+
36
+ # List of attributes with nullable: true
37
+ def self.openapi_nullable
38
+ Set.new([
39
+ ])
40
+ end
41
+
42
+ # Initializes the object
43
+ # @param [Hash] attributes Model attributes in the form of hash
44
+ def initialize(attributes = {})
45
+ if (!attributes.is_a?(Hash))
46
+ fail ArgumentError, "The input argument (attributes) must be a hash in `CartItemSupplierReferences` initialize method"
47
+ end
48
+
49
+ # check to see if the attribute exists and convert string to symbol for hash key
50
+ attributes = attributes.each_with_object({}) { |(k, v), h|
51
+ if (!self.class.attribute_map.key?(k.to_sym))
52
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CartItemSupplierReferences`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
53
+ end
54
+ h[k.to_sym] = v
55
+ }
56
+
57
+ if attributes.key?(:'supplier_id')
58
+ self.supplier_id = attributes[:'supplier_id']
59
+ end
60
+
61
+ if attributes.key?(:'order_reference')
62
+ self.order_reference = attributes[:'order_reference']
63
+ end
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
+ supplier_id == o.supplier_id &&
72
+ order_reference == o.order_reference
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 [Integer] Hash code
83
+ def hash
84
+ [supplier_id, order_reference].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 self.build_from_hash(attributes)
91
+ return nil unless attributes.is_a?(Hash)
92
+ attributes = attributes.transform_keys(&:to_sym)
93
+ transformed_hash = {}
94
+ openapi_types.each_pair do |key, type|
95
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
96
+ transformed_hash["#{key}"] = nil
97
+ elsif type =~ /\AArray<(.*)>/i
98
+ # check to ensure the input is an array given that the attribute
99
+ # is documented as an array but the input is not
100
+ if attributes[attribute_map[key]].is_a?(Array)
101
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
102
+ end
103
+ elsif !attributes[attribute_map[key]].nil?
104
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
105
+ end
106
+ end
107
+ new(transformed_hash)
108
+ end
109
+
110
+ # Deserializes the data based on type
111
+ # @param string type Data type
112
+ # @param string value Value to be deserialized
113
+ # @return [Object] Deserialized data
114
+ def self._deserialize(type, value)
115
+ case type.to_sym
116
+ when :Time
117
+ Time.parse(value)
118
+ when :Date
119
+ Date.parse(value)
120
+ when :String
121
+ value.to_s
122
+ when :Integer
123
+ value.to_i
124
+ when :Float
125
+ value.to_f
126
+ when :Boolean
127
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
128
+ true
129
+ else
130
+ false
131
+ end
132
+ when :Object
133
+ # generic object (usually a Hash), return directly
134
+ value
135
+ when /\AArray<(?<inner_type>.+)>\z/
136
+ inner_type = Regexp.last_match[:inner_type]
137
+ value.map { |v| _deserialize(inner_type, v) }
138
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
139
+ k_type = Regexp.last_match[:k_type]
140
+ v_type = Regexp.last_match[:v_type]
141
+ {}.tap do |hash|
142
+ value.each do |k, v|
143
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
144
+ end
145
+ end
146
+ else # model
147
+ # models (e.g. Pet) or oneOf
148
+ klass = PCPServerSDK::Models.const_get(type)
149
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
150
+ end
151
+ end
152
+
153
+ # Returns the string representation of the object
154
+ # @return [String] String presentation of the object
155
+ def to_s
156
+ to_hash.to_s
157
+ end
158
+
159
+ # to_body is an alias to to_hash (backward compatibility)
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_body
162
+ to_hash
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ if value.nil?
172
+ is_nullable = self.class.openapi_nullable.include?(attr)
173
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
174
+ end
175
+
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ # Outputs non-array value in the form of hash
182
+ # For object, use to_hash. Otherwise, just return the value
183
+ # @param [Object] value Any valid value
184
+ # @return [Hash] Returns the value in the form of hash
185
+ def _to_hash(value)
186
+ if value.is_a?(Array)
187
+ value.compact.map { |v| _to_hash(v) }
188
+ elsif value.is_a?(Hash)
189
+ {}.tap do |hash|
190
+ value.each { |k, v| hash[k] = _to_hash(v) }
191
+ end
192
+ elsif value.respond_to? :to_hash
193
+ value.to_hash
194
+ else
195
+ value
196
+ end
197
+ end
198
+ end
199
+ end
200
+ end