Skip to content

Commit

Permalink
fix spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry-L committed Dec 28, 2016
1 parent aee51db commit 21daf82
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions lib/zuora/objects/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def reload!

def self.unselectable_attributes
class_variable_get(:@@complex_attributes).keys +
class_variable_get(:@@write_only_attributes) +
class_variable_get(:@@deferred_attributes)
class_variable_get(:@@write_only_attributes) +
class_variable_get(:@@deferred_attributes)
end

def self.namespace(uri)
Expand Down
28 changes: 14 additions & 14 deletions lib/zuora/soap_connector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ def parse_attributes(type, attrs={})
z = tdefs.find{|d| d[0] == [klass, ref] }
if z
case z[1]
when 'integer', 'int' then
attrs[a] = v.nil? ? nil : v.to_i
when 'decimal' then
attrs[a] = v.nil? ? nil : BigDecimal(v.to_s)
when 'float', 'double' then
attrs[a] = v.nil? ? nil : v.to_f
when 'integer', 'int' then
attrs[a] = v.nil? ? nil : v.to_i
when 'decimal' then
attrs[a] = v.nil? ? nil : BigDecimal(v.to_s)
when 'float', 'double' then
attrs[a] = v.nil? ? nil : v.to_f
end
end
end
Expand All @@ -117,14 +117,14 @@ def generate_complex_objects(builder, action)
@model.send(scope).each do |object|
td.__send__(zns, scope_element, 'xsi:type' => "#{ons}:#{scope_element}") do
case action
when :create
object.to_hash.each do |k,v|
td.__send__(ons, k.to_s.zuora_camelize.to_sym, v) unless v.nil?
end
when :update
object.to_hash.reject{|k,v| object.read_only_attributes.include?(k) || object.restrain_attributes.include?(k) }.each do |k,v|
td.__send__(ons, k.to_s.zuora_camelize.to_sym, v) unless v.nil?
end
when :create
object.to_hash.each do |k,v|
td.__send__(ons, k.to_s.zuora_camelize.to_sym, v) unless v.nil?
end
when :update
object.to_hash.reject{|k,v| object.read_only_attributes.include?(k) || object.restrain_attributes.include?(k) }.each do |k,v|
td.__send__(ons, k.to_s.zuora_camelize.to_sym, v) unless v.nil?
end
end
end
end
Expand Down

0 comments on commit 21daf82

Please sign in to comment.