Skip to content

Commit

Permalink
Merge branch 'fix_api_templates' into fix_after_ship_for_non_mollie_o…
Browse files Browse the repository at this point in the history
…rders
  • Loading branch information
Oldharlem committed Mar 20, 2020
2 parents b90cb60 + 426c20e commit 25f284b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
7 changes: 7 additions & 0 deletions app/views/spree/api/v1/orders/complete.rabl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
child available_payment_methods: :payment_methods do
attributes :id, :name, :method_type

node :gateways do |payment_method|
payment_method.gateways(order: @order) if @order.present?
end
end
8 changes: 1 addition & 7 deletions app/views/spree/api/v1/orders/complete.v1.rabl
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
child available_payment_methods: :payment_methods do
attributes :id, :name, :method_type

node :gateways do |payment_method|
payment_method.gateways(order: @order) if @order.present?
end
end
extends 'spree/api/v1/orders/complete.rabl'
7 changes: 7 additions & 0 deletions app/views/spree/api/v1/orders/payment.rabl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
child available_payment_methods: :payment_methods do
attributes :id, :name, :method_type

node :gateways do |payment_method|
payment_method.gateways(order: @order) if @order.present?
end
end
8 changes: 1 addition & 7 deletions app/views/spree/api/v1/orders/payment.v1.rabl
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
child available_payment_methods: :payment_methods do
attributes :id, :name, :method_type

node :gateways do |payment_method|
payment_method.gateways(order: @order) if @order.present?
end
end
extends 'spree/api/v1/orders/payment.rabl'

0 comments on commit 25f284b

Please sign in to comment.