Sha256: 4dac50b776d9bdfdee30e8bbf3cecda87651950b8c02edd27e717184971ef31f

Contents?: true

Size: 511 Bytes

Versions: 1

Compression:

Stored size: 511 Bytes

Contents

module Conekta
  module APIOperations
    module CreateMember
      def create_member(member, params={}, api_key=nil)
        path = "/customers/#{self.id}/#{member}"
        response, api_key = Conekta.request(:post, path, api_key, params)
        obj = Util.convert_to_conekta_object(response, api_key)
        if obj.class == ConektaObject
          count = self.cards.count
          self.cards[count] = obj
        else
          self.subscription = obj
        end
        obj
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
conekta-0.3.3 lib/conekta/api_operations/create_member.rb