Class: Spaceship::Tunes::IAPList
- Defined in:
- spaceship/lib/spaceship/tunes/iap_list.rb
Instance Attribute Summary collapse
-
#app_maximum_number_of_codes ⇒ Object
Returns the value of attribute app_maximum_number_of_codes.
-
#application ⇒ Spaceship::Tunes::Application
A reference to the application.
-
#can_delete_addon ⇒ Object
Returns the value of attribute can_delete_addon.
-
#duration_days ⇒ Object
Returns the value of attribute duration_days.
-
#family_reference_name ⇒ String
Family Reference Name.
-
#is_editable ⇒ Object
Returns the value of attribute is_editable.
-
#is_news_subscription ⇒ Object
Returns the value of attribute is_news_subscription.
-
#is_required ⇒ Object
Returns the value of attribute is_required.
-
#last_modified_date ⇒ Object
Returns the value of attribute last_modified_date.
-
#maximum_number_of_codes ⇒ Object
Returns the value of attribute maximum_number_of_codes.
-
#number_of_codes ⇒ Object
Returns the value of attribute number_of_codes.
-
#product_id ⇒ String
The IAP Product-Id.
-
#purple_apple_id ⇒ Object
Returns the value of attribute purple_apple_id.
-
#reference_name ⇒ String
The IAP Referencename.
-
#versions ⇒ Object
Returns the value of attribute versions.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from TunesBase
Methods inherited from Base
attr_accessor, attr_mapping, attributes, #attributes, factory, #initialize, #inspect, mapping_module, method_missing, set_client, #setup, #to_s
Constructor Details
This class inherits a constructor from Spaceship::Base
Instance Attribute Details
#app_maximum_number_of_codes ⇒ Object
Returns the value of attribute app_maximum_number_of_codes.
27 28 29 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 27 def app_maximum_number_of_codes @app_maximum_number_of_codes end |
#application ⇒ Spaceship::Tunes::Application
Returns A reference to the application.
9 10 11 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 9 def application @application end |
#can_delete_addon ⇒ Object
Returns the value of attribute can_delete_addon.
30 31 32 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 30 def can_delete_addon @can_delete_addon end |
#duration_days ⇒ Object
Returns the value of attribute duration_days.
20 21 22 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 20 def duration_days @duration_days end |
#family_reference_name ⇒ String
Returns Family Reference Name.
18 19 20 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 18 def family_reference_name @family_reference_name end |
#is_editable ⇒ Object
Returns the value of attribute is_editable.
28 29 30 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 28 def is_editable @is_editable end |
#is_news_subscription ⇒ Object
Returns the value of attribute is_news_subscription.
24 25 26 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 24 def is_news_subscription @is_news_subscription end |
#is_required ⇒ Object
Returns the value of attribute is_required.
29 30 31 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 29 def is_required @is_required end |
#last_modified_date ⇒ Object
Returns the value of attribute last_modified_date.
23 24 25 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 23 def last_modified_date @last_modified_date end |
#maximum_number_of_codes ⇒ Object
Returns the value of attribute maximum_number_of_codes.
26 27 28 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 26 def maximum_number_of_codes @maximum_number_of_codes end |
#number_of_codes ⇒ Object
Returns the value of attribute number_of_codes.
25 26 27 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 25 def number_of_codes @number_of_codes end |
#product_id ⇒ String
Returns the IAP Product-Id.
15 16 17 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 15 def product_id @product_id end |
#purple_apple_id ⇒ Object
Returns the value of attribute purple_apple_id.
22 23 24 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 22 def purple_apple_id @purple_apple_id end |
#reference_name ⇒ String
Returns the IAP Referencename.
12 13 14 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 12 def reference_name @reference_name end |
#versions ⇒ Object
Returns the value of attribute versions.
21 22 23 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 21 def versions @versions end |
Instance Method Details
#delete! ⇒ Object
71 72 73 |
# 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 ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 |
# 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 ⇒ Object
54 55 56 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 54 def status Tunes::IAPStatus.get_from_string(raw_data["iTunesConnectStatus"]) end |
#type ⇒ Object
50 51 52 |
# File 'spaceship/lib/spaceship/tunes/iap_list.rb', line 50 def type Tunes::IAPType.get_from_string(raw_data["addOnType"]) end |