@@ 44,7 44,7 @@ class AsyncBraintree
end
def method_missing(m, *args)
- return super if false # cover everything for now
+ return super if respond_to_missing?(m, *args)
self.then { |o| o.public_send(m, *args) }
end
end
@@ 330,19 330,21 @@ command :execute?, node: "buy-credit", sessionid: nil do |iq|
type: "fixed",
value: "Current balance: $#{'%.2f' % balance}"
},
- ({
- var: "payment_method",
- type: "list-single",
- label: "Credit card to pay with",
- value: default_payment_method.to_s,
- required: true,
- options: payment_methods.map.with_index do |method, idx|
- {
- value: idx.to_s,
- label: "#{method.card_type} #{method.last_4}"
- }
- end
- } if payment_methods.length > 1),
+ if payment_methods.length > 1
+ {
+ var: "payment_method",
+ type: "list-single",
+ label: "Credit card to pay with",
+ value: default_payment_method.to_s,
+ required: true,
+ options: payment_methods.map.with_index do |method, idx|
+ {
+ value: idx.to_s,
+ label: "#{method.card_type} #{method.last_4}"
+ }
+ end
+ }
+ end,
XEP0122Field.new(
"xs:decimal",
range: (0..1000),