Class: Google4R::Checkout::Item::Subscription::RecurrentItem
- Inherits:
-
Google4R::Checkout::Item
- Object
- Google4R::Checkout::Item
- Google4R::Checkout::Item::Subscription::RecurrentItem
- Defined in:
- lib/google4r/checkout/shared.rb
Instance Attribute Summary collapse
-
#subscription ⇒ Object
Returns the value of attribute subscription.
Attributes inherited from Google4R::Checkout::Item
#description, #digital_content, #id, #name, #private_data, #quantity, #shopping_cart, #tax_table, #unit_price, #weight
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(subscription) ⇒ RecurrentItem
constructor
A new instance of RecurrentItem.
Methods inherited from Google4R::Checkout::Item
#create_digital_content, #create_subscription
Constructor Details
#initialize(subscription) ⇒ RecurrentItem
Returns a new instance of RecurrentItem.
545 546 547 |
# File 'lib/google4r/checkout/shared.rb', line 545 def initialize(subscription) @subscription = subscription end |
Instance Attribute Details
#subscription ⇒ Object
Returns the value of attribute subscription.
543 544 545 |
# File 'lib/google4r/checkout/shared.rb', line 543 def subscription @subscription end |
Class Method Details
.create_from_element(element, subscription) ⇒ Object
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'lib/google4r/checkout/shared.rb', line 549 def self.create_from_element(element, subscription) item = super(element, nil) result = RecurrentItem.new(subscription) result.description = item.description result.digital_content = item.digital_content result.id = item.id result.name = item.name result.private_data = item.private_data result.quantity = item.quantity result.tax_table = item.tax_table result.unit_price = item.unit_price result.weight = item.weight return result end |