Sha256: 8e74fe8dc6ba72bcc1ec2894904d30505c167b2493cbcfdabb890e65b84b3b60

Contents?: true

Size: 1.07 KB

Versions: 73

Compression:

Stored size: 1.07 KB

Contents

# frozen_string_literal: true

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

    OBJECT_NAME = "alipay_account"

    def resource_url
      if !respond_to?(:customer) || customer.nil?
        raise NotImplementedError,
              "Alipay accounts cannot be accessed without a customer ID."
      end

      "#{Customer.resource_url}/#{CGI.escape(customer)}/sources" \
        "/#{CGI.escape(id)}"
    end

    def self.update(_id, _params = nil, _opts = nil)
      raise NotImplementedError,
            "Alipay accounts cannot be updated without a customer ID. " \
            "Update an Alipay account using `Customer.update_source(" \
            "'customer_id', 'alipay_account_id', update_params)`"
    end

    def self.retrieve(_id, _opts = nil)
      raise NotImplementedError,
            "Alipay accounts cannot be retrieved without a customer ID. " \
            "Retrieve an Alipay account using `Customer.retrieve_source(" \
            "'customer_id', 'alipay_account_id')`"
    end
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
stripe-13.4.0.pre.beta.3 lib/stripe/resources/alipay_account.rb
stripe-13.3.1 lib/stripe/resources/alipay_account.rb
stripe-13.4.0.pre.beta.2 lib/stripe/resources/alipay_account.rb
stripe-13.4.0.pre.beta.1 lib/stripe/resources/alipay_account.rb
stripe-13.3.0 lib/stripe/resources/alipay_account.rb
stripe-13.3.0.pre.beta.3 lib/stripe/resources/alipay_account.rb
stripe-13.3.0.pre.beta.2 lib/stripe/resources/alipay_account.rb
stripe-13.3.0.pre.beta.1 lib/stripe/resources/alipay_account.rb
stripe-13.2.0 lib/stripe/resources/alipay_account.rb
stripe-13.1.2 lib/stripe/resources/alipay_account.rb
stripe-13.2.0.pre.beta.3 lib/stripe/resources/alipay_account.rb
stripe-13.2.0.pre.beta.2 lib/stripe/resources/alipay_account.rb
stripe-13.1.1 lib/stripe/resources/alipay_account.rb
stripe-13.2.0.pre.beta.1 lib/stripe/resources/alipay_account.rb
stripe-13.1.0 lib/stripe/resources/alipay_account.rb
stripe-13.0.2 lib/stripe/resources/alipay_account.rb
stripe-13.1.0.pre.beta.3 lib/stripe/resources/alipay_account.rb
stripe-13.0.1 lib/stripe/resources/alipay_account.rb
stripe-13.1.0.pre.beta.2 lib/stripe/resources/alipay_account.rb
stripe-13.0.0 lib/stripe/resources/alipay_account.rb