lib/quick_travel/checkout.rb in quicktravel_client-3.7.0 vs lib/quick_travel/checkout.rb in quicktravel_client-3.8.0
- old
+ new
@@ -44,10 +44,11 @@
end
# TODO Move to an external builder?
def self.attributes_for
attrs = yield
- attrs[:completed] = attrs['progress'] == 'completed' || attrs['successful']
+ attrs[:completed] = attrs['progress'] == 'completed'
+ attrs[:completed] = attrs['successful'] if attrs['successful'].present?
attrs[:successful] = attrs[:completed]
attrs
rescue AdapterError => e
{
completed: true,