Sha256: d4b07abe887d796162ff835ed708a49c5e2ffc527a32ce30500c093c96262b94

Contents?: true

Size: 798 Bytes

Versions: 36

Compression:

Stored size: 798 Bytes

Contents

# frozen_string_literal: true

module IronBank
  module Resources
    # A Zuora subscription, belongs to an account, holds rate plans and is
    # versioned through each amendment.
    #
    class Subscription < Resource
      with_schema
      with_cache

      with_one :account
      with_one :invoice_owner, resource_name: "Account"

      with_one :original, resource_name: "Subscription"
      with_one :previous,
               resource_name: "Subscription",
               foreign_key:   "previous_subscription_id"

      with_many :rate_plans, alias: :plans
      with_many :usages

      # FIXME: a subscription can only have at most one amendment (no amendment
      # for the last version) but there are no `AmendmentId` on a subscription.
      with_many :amendments
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
iron_bank-5.4.1 lib/iron_bank/resources/subscription.rb
iron_bank-5.4.0 lib/iron_bank/resources/subscription.rb
iron_bank-5.3.2 lib/iron_bank/resources/subscription.rb
iron_bank-5.3.0 lib/iron_bank/resources/subscription.rb
iron_bank-5.2.6 lib/iron_bank/resources/subscription.rb
iron_bank-5.2.4 lib/iron_bank/resources/subscription.rb
iron_bank-5.2.3 lib/iron_bank/resources/subscription.rb
iron_bank-5.2.0 lib/iron_bank/resources/subscription.rb
iron_bank-5.1.1 lib/iron_bank/resources/subscription.rb
iron_bank-5.1.0 lib/iron_bank/resources/subscription.rb
iron_bank-4.4.3 lib/iron_bank/resources/subscription.rb
iron_bank-5.0.1 lib/iron_bank/resources/subscription.rb
iron_bank-5.0.0 lib/iron_bank/resources/subscription.rb
iron_bank-4.4.1 lib/iron_bank/resources/subscription.rb
iron_bank-4.4.0 lib/iron_bank/resources/subscription.rb
iron_bank-4.3.1 lib/iron_bank/resources/subscription.rb
iron_bank-4.3.0 lib/iron_bank/resources/subscription.rb
iron_bank-4.2.0 lib/iron_bank/resources/subscription.rb
iron_bank-4.1.1 lib/iron_bank/resources/subscription.rb
iron_bank-4.1.0 lib/iron_bank/resources/subscription.rb