Sha256: bb60bce935bc47bcdbbdadd3c806a3e6da4603d09aa40b3c92a7bc3e07a129b9
Contents?: true
Size: 932 Bytes
Versions: 21
Compression:
Stored size: 932 Bytes
Contents
module Conekta class Customer < Resource include Conekta::Operations::Find include Conekta::Operations::Where include Conekta::Operations::Create include Conekta::Operations::Delete include Conekta::Operations::Update include Conekta::Operations::CustomAction include Conekta::Operations::CreateMember def load_from(response=nil) if response super end customer = self self.cards.each do |k,v| if !v.respond_to? :deleted or !v.deleted v.create_attr('customer', customer) self.cards.set_val(k,v) end end if self.respond_to? :subscription and self.subscription self.subscription.create_attr('customer', customer) end end def create_card(params) self.create_member('cards', params) end def create_subscription(params) self.create_member('subscription', params) end end end
Version data entries
21 entries across 21 versions & 1 rubygems