application_charge.rb 351 B

123456789101112131415
  1. module ShopifyAPI
  2. class ApplicationCharge < Base
  3. undef_method :test
  4. class << self
  5. [:pending, :expired, :accepted, :declined].each do |status|
  6. define_method(status) { (all || []).select { |c| c.status == status.to_s } }
  7. end
  8. end
  9. def activate
  10. load_attributes_from_response(post(:activate))
  11. end
  12. end
  13. end