class Venice::PendingRenewalInfo

Attributes

auto_renew_product_id[R]

The current renewal preference for the auto-renewable subscription. The value for this key corresponds to the productIdentifier property of the product that the customer’s subscription renews.

auto_renew_status[R]

The current renewal status for the auto-renewable subscription. This key is only present for auto-renewable subscription receipts, for active or expired subscriptions

cancellation_reason[R]

For a transaction that was cancelled, the reason for cancellation. Use this value along with the cancellation date to identify possible issues in your app that may lead customers to contact Apple customer support.

expiration_intent[R]

For an expired subscription, the reason for the subscription expiration. This key is only present for a receipt containing an expired auto-renewable subscription.

is_in_billing_retry_period[R]

For an expired subscription, whether or not Apple is still attempting to automatically renew the subscription. If the customer’s subscription failed to renew because the App Store was unable to complete the transaction, this value will reflect whether or not the App Store is still trying to renew the subscription.

original_json_data[R]

Original JSON data returned from Apple for a PendingRenewalInfo object.

product_id[R]

The product identifier of the item that was purchased. This value corresponds to the productIdentifier property of the SKPayment object stored in the transaction’s payment property.

Public Class Methods

new(attributes) click to toggle source
# File lib/venice/pending_renewal_info.rb, line 34
def initialize(attributes)
  @original_json_data = attributes
  @expiration_intent = Integer(attributes['expiration_intent']) if attributes['expiration_intent']
  @auto_renew_status = Integer(attributes['auto_renew_status']) if attributes['auto_renew_status']
  @auto_renew_product_id = attributes['auto_renew_product_id']

  if attributes['is_in_billing_retry_period']
    @is_in_billing_retry_period = (attributes['is_in_billing_retry_period'] == '1')
  end

  @product_id = attributes['product_id']

  @price_consent_status = Integer(attributes['price_consent_status']) if attributes['price_consent_status']
  @cancellation_reason = Integer(attributes['cancellation_reason']) if attributes['cancellation_reason']
end

Public Instance Methods

to_h()
Alias for: to_hash
to_hash() click to toggle source
# File lib/venice/pending_renewal_info.rb, line 50
def to_hash
  {
    expiration_intent: @expiration_intent,
    auto_renew_status: @auto_renew_status,
    auto_renew_product_id: @auto_renew_product_id,
    is_in_billing_retry_period: @is_in_billing_retry_period,
    product_id: @product_id,
    price_consent_status: @price_consent_status,
    cancellation_reason: @cancellation_reason
  }
end
Also aliased as: to_h
to_json() click to toggle source
# File lib/venice/pending_renewal_info.rb, line 64
def to_json
  to_hash.to_json
end