Class: Honeycrisp::InAppPurchase
- Inherits:
-
Object
- Object
- Honeycrisp::InAppPurchase
- Defined in:
- lib/honeycrisp/in_app_purchase.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#is_trial_period ⇒ Object
Returns the value of attribute is_trial_period.
-
#original_purchase_date_ms ⇒ Object
Returns the value of attribute original_purchase_date_ms.
-
#original_transaction_id ⇒ Object
Returns the value of attribute original_transaction_id.
-
#product_id ⇒ Object
Returns the value of attribute product_id.
-
#purchase_date_ms ⇒ Object
Returns the value of attribute purchase_date_ms.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ InAppPurchase
constructor
A new instance of InAppPurchase.
- #original_purchase_date ⇒ Object
- #purchase_date ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ InAppPurchase
Returns a new instance of InAppPurchase.
6 7 8 9 10 11 12 13 |
# File 'lib/honeycrisp/in_app_purchase.rb', line 6 def initialize(attributes = {}) attributes.each do |k, v| send("#{k}=", v) if respond_to?("#{k}=".to_sym) end # Return self self end |
Instance Attribute Details
#is_trial_period ⇒ Object
Returns the value of attribute is_trial_period.
3 4 5 |
# File 'lib/honeycrisp/in_app_purchase.rb', line 3 def is_trial_period @is_trial_period end |
#original_purchase_date_ms ⇒ Object
Returns the value of attribute original_purchase_date_ms.
3 4 5 |
# File 'lib/honeycrisp/in_app_purchase.rb', line 3 def original_purchase_date_ms @original_purchase_date_ms end |
#original_transaction_id ⇒ Object
Returns the value of attribute original_transaction_id.
3 4 5 |
# File 'lib/honeycrisp/in_app_purchase.rb', line 3 def original_transaction_id @original_transaction_id end |
#product_id ⇒ Object
Returns the value of attribute product_id.
3 4 5 |
# File 'lib/honeycrisp/in_app_purchase.rb', line 3 def product_id @product_id end |
#purchase_date_ms ⇒ Object
Returns the value of attribute purchase_date_ms.
3 4 5 |
# File 'lib/honeycrisp/in_app_purchase.rb', line 3 def purchase_date_ms @purchase_date_ms end |
#quantity ⇒ Object
Returns the value of attribute quantity.
3 4 5 |
# File 'lib/honeycrisp/in_app_purchase.rb', line 3 def quantity @quantity end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
3 4 5 |
# File 'lib/honeycrisp/in_app_purchase.rb', line 3 def transaction_id @transaction_id end |
Instance Method Details
#original_purchase_date ⇒ Object
19 20 21 |
# File 'lib/honeycrisp/in_app_purchase.rb', line 19 def original_purchase_date Time.at(original_purchase_date_ms.to_i / 1000).utc end |
#purchase_date ⇒ Object
15 16 17 |
# File 'lib/honeycrisp/in_app_purchase.rb', line 15 def purchase_date Time.at(purchase_date_ms.to_i / 1000).utc end |