Sha256: 777c1a110c6b7d95b210282c5d4fe266213b2bb10105fd3e5a61f821c46fd3e5

Contents?: true

Size: 821 Bytes

Versions: 15

Compression:

Stored size: 821 Bytes

Contents

module Stripe
  class AlipayAccount < APIResource
    include Stripe::APIOperations::Save
    include Stripe::APIOperations::Delete

    OBJECT_NAME = 'alipay_account'

    def resource_url
      if respond_to?(:customer) && !self.customer.nil?
        "#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
      end
    end

    def self.update(id, params=nil, opts=nil)
      raise NotImplementedError.new("Alipay accounts cannot be updated without a customer ID. Update an Alipay account by `a = customer.sources.retrieve('alipay_account_id'); a.save`")
    end

    def self.retrieve(id, opts=nil)
      raise NotImplementedError.new("Alipay accounts cannot be retrieved without a customer ID. Retrieve an Alipay account using customer.sources.retrieve('alipay_account_id')")
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
stripe-3.3.2 lib/stripe/alipay_account.rb
stripe-3.3.1 lib/stripe/alipay_account.rb
stripe-3.3.0 lib/stripe/alipay_account.rb
stripe-3.2.0 lib/stripe/alipay_account.rb
stripe-3.1.0 lib/stripe/alipay_account.rb
stripe-3.0.3 lib/stripe/alipay_account.rb
stripe-3.0.1 lib/stripe/alipay_account.rb
stripe-3.0.0 lib/stripe/alipay_account.rb
stripe-2.12.0 lib/stripe/alipay_account.rb
stripe-2.11.0 lib/stripe/alipay_account.rb
stripe-2.10.0 lib/stripe/alipay_account.rb
stripe-2.9.0 lib/stripe/alipay_account.rb
stripe-2.8.0 lib/stripe/alipay_account.rb
stripe-2.7.0 lib/stripe/alipay_account.rb
stripe-2.6.0 lib/stripe/alipay_account.rb