Sha256: 88082fd7edb95598dfc17478e855204a4e024f8cbc79cbc1a3f81edfcb5b4a39

Contents?: true

Size: 426 Bytes

Versions: 3

Compression:

Stored size: 426 Bytes

Contents

module PagSeguro
  class Subscriptions < Base
    def find_by_notification_code(code)
      parse_body api.get("/pre-approvals/notifications/#{code}")
    end

    def create(params)
      params = parameterize params

      parse_body api.post("/pre-approvals", params)
    end

    def update(code, params)
      params = parameterize params

      api.put("/pre-approvals/#{code}/payment-method", params)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pagseguro_next-0.2.0 lib/pagseguro/subscriptions.rb
pagseguro_next-0.1.1 lib/pagseguro/subscriptions.rb
pagseguro_next-0.1.0 lib/pagseguro/subscriptions.rb