class Spaceship::Tunes::IAPList

Attributes

app_maximum_number_of_codes[RW]
application[RW]

@return (Spaceship::Tunes::Application) A reference to the application

can_delete_addon[RW]
duration_days[RW]
family_reference_name[RW]

@return (String) Family Reference Name

is_editable[RW]
is_news_subscription[RW]
is_required[RW]
last_modified_date[RW]
maximum_number_of_codes[RW]
number_of_codes[RW]
product_id[RW]

@return (String) the IAP Product-Id

purple_apple_id[RW]
reference_name[RW]

@return (String) the IAP Referencename

versions[RW]

Public Instance Methods

delete!() click to toggle source
# File spaceship/lib/spaceship/tunes/iap_list.rb, line 71
def delete!
  client.delete_iap!(app_id: application.apple_id, purchase_id: self.purchase_id)
end
edit() click to toggle source
# File spaceship/lib/spaceship/tunes/iap_list.rb, line 58
def edit
  attrs = client.load_iap(app_id: application.apple_id, purchase_id: self.purchase_id)
  attrs[:application] = application

  if attrs["addOnType"] == Spaceship::Tunes::IAPType::RECURRING
    raw_pricing_data = client.load_recurring_iap_pricing(app_id: application.apple_id,
                                                         purchase_id: self.purchase_id)
    attrs["pricingData"] = raw_pricing_data
  end

  Tunes::IAPDetail.new(attrs)
end
status() click to toggle source
# File spaceship/lib/spaceship/tunes/iap_list.rb, line 54
def status
  Tunes::IAPStatus.get_from_string(raw_data["iTunesConnectStatus"])
end
type() click to toggle source
# File spaceship/lib/spaceship/tunes/iap_list.rb, line 50
def type
  Tunes::IAPType.get_from_string(raw_data["addOnType"])
end