Sha256: 3676610d58e7dc0ec36cf84045c8b3c34dc77d4a11ebcae53c70c45085a8d38f

Contents?: true

Size: 997 Bytes

Versions: 5

Compression:

Stored size: 997 Bytes

Contents

module ChargeBee
  class Card < Model

  attr_accessor :customer_id, :status, :gateway, :first_name, :last_name, :iin, :last4, :card_type,
  :expiry_month, :expiry_year, :billing_addr1, :billing_addr2, :billing_city, :billing_state_code,
  :billing_state, :billing_country, :billing_zip, :ip_address, :masked_number

  # OPERATIONS
  #-----------

  def self.retrieve(id, env=nil, headers={})
    Request.send('get', uri_path("cards",id.to_s), {}, env, headers)
  end

  def self.update_card_for_customer(id, params, env=nil, headers={})
    Request.send('post', uri_path("customers",id.to_s,"credit_card"), params, env, headers)
  end

  def self.switch_gateway_for_customer(id, params, env=nil, headers={})
    Request.send('post', uri_path("customers",id.to_s,"switch_gateway"), params, env, headers)
  end

  def self.delete_card_for_customer(id, env=nil, headers={})
    Request.send('post', uri_path("customers",id.to_s,"delete_card"), {}, env, headers)
  end

  end # ~Card
end # ~ChargeBee

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chargebee-2.0.2 lib/chargebee/models/card.rb
chargebee-2.0.1 lib/chargebee/models/card.rb
chargebee-2.0.0 lib/chargebee/models/card.rb
chargebee-1.7.2 lib/chargebee/models/card.rb
chargebee-1.7.1 lib/chargebee/models/card.rb