Sha256: 58453f5159d90415b27be4116c0368fb48d82cb2f305b3805920f62ea3203cc6

Contents?: true

Size: 1.1 KB

Versions: 31

Compression:

Stored size: 1.1 KB

Contents

module ChargeBee
  class PaymentVoucher < Model

    class LinkedInvoice < Model
      attr_accessor :invoice_id, :txn_id, :applied_at
    end

  attr_accessor :id, :id_at_gateway, :payment_voucher_type, :expires_at, :status, :subscription_id,
  :currency_code, :amount, :gateway_account_id, :payment_source_id, :gateway, :payload, :error_code,
  :error_text, :url, :date, :resource_version, :updated_at, :customer_id, :linked_invoices

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

  def self.create(params, env=nil, headers={})
    Request.send('post', uri_path("payment_vouchers"), params, env, headers)
  end

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

  def self.payment_vouchers_for_invoice(id, params={}, env=nil, headers={})
    Request.send('get', uri_path("invoices",id.to_s,"payment_vouchers"), params, env, headers)
  end

  def self.payment_vouchers_for_customer(id, params={}, env=nil, headers={})
    Request.send('get', uri_path("customers",id.to_s,"payment_vouchers"), params, env, headers)
  end

  end # ~PaymentVoucher
end # ~ChargeBee

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
chargebee-2.49.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.48.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.47.1 lib/chargebee/models/payment_voucher.rb
chargebee-2.47.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.47.0.beta.1 lib/chargebee/models/payment_voucher.rb
chargebee-2.46.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.45.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.44.1 lib/chargebee/models/payment_voucher.rb
chargebee-2.44.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.43.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.42.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.41.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.40.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.38.1 lib/chargebee/models/payment_voucher.rb
chargebee-2.38.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.37.1 lib/chargebee/models/payment_voucher.rb
chargebee-2.37.0 lib/chargebee/models/payment_voucher.rb
chargebee-2.36.2 lib/chargebee/models/payment_voucher.rb
chargebee-2.36.1 lib/chargebee/models/payment_voucher.rb
chargebee-2.36.0 lib/chargebee/models/payment_voucher.rb