Sha256: 051898c742e58634e2ed47c23514673864b92baecbe46cba49bbdb973e7699a6

Contents?: true

Size: 560 Bytes

Versions: 26

Compression:

Stored size: 560 Bytes

Contents

module Chargify
  module Renewal
    class Preview < Base
      self.prefix = "/subscriptions/:subscription_id/renewals/"

      def create
        response = post(:preview, {}, attributes.send("to_#{self.class.format.extension}", :dasherize => false))
        load_attributes_from_response(response)
      end

      private

      def custom_method_new_element_url(method_name, options = {})
        "#{self.class.prefix(prefix_options)}#{method_name}.#{self.class.format.extension}#{self.class.__send__(:query_string, options)}"
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
chargify_api_ares-1.1.0 lib/chargify_api_ares/resources/renewal_preview.rb
chargify_api_ares-1.1.0.pre lib/chargify_api_ares/resources/renewal_preview.rb
chargify_api_ares-1.0.5 lib/chargify_api_ares/resources/renewal_preview.rb
chargify_api_ares-1.0.4 lib/chargify_api_ares/resources/renewal_preview.rb
chargify_api_ares-1.0.3 lib/chargify_api_ares/resources/renewal_preview.rb
chargify_api_ares-1.0.2 lib/chargify_api_ares/resources/renewal_preview.rb