Sha256: 002c3ed255f5b24e3cdbc8207289c78b86a9e21224765077733902be469696a3

Contents?: true

Size: 501 Bytes

Versions: 1

Compression:

Stored size: 501 Bytes

Contents

module Conekta
  module APIOperations
    module ModifyMember
      module ClassMethods
        def modify_member(parent, member, params={}, action, method, api_key=nil)
          path = "#{path}/#{member}/#{action}"
          response, api_key = Conekta.request(method.to_sym, path, api_key, params)
          self.try("#{parent}".to_sym).try("#{member}".to_sym) = self
          self
        end
      end

      def self.included(base)
        base.extend(ClassMethods)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
conekta-0.3.1 lib/conekta/api_operations/modify_member.rb