Class: Paymill::Subscription
- Includes:
- Restful::Delete, Restful::Update
- Defined in:
- lib/paymill/models/subscription.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#canceled_at ⇒ Object
readonly
Returns the value of attribute canceled_at.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#end_of_period ⇒ Object
readonly
Returns the value of attribute end_of_period.
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#is_canceled ⇒ Object
readonly
Returns the value of attribute is_canceled.
-
#is_deleted ⇒ Object
readonly
Returns the value of attribute is_deleted.
-
#livemode ⇒ Object
readonly
Returns the value of attribute livemode.
-
#mandate_reference ⇒ Object
readonly
Returns the value of attribute mandate_reference.
-
#name ⇒ Object
Returns the value of attribute name.
-
#next_capture_at ⇒ Object
readonly
Returns the value of attribute next_capture_at.
-
#offer ⇒ Object
Returns the value of attribute offer.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#period_of_validity ⇒ Object
Returns the value of attribute period_of_validity.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#temp_amount ⇒ Object
readonly
Returns the value of attribute temp_amount.
-
#trial_end ⇒ Object
Returns the value of attribute trial_end.
-
#trial_start ⇒ Object
readonly
Returns the value of attribute trial_start.
Attributes inherited from Base
#app_id, #created_at, #id, #updated_at
Instance Method Summary collapse
- #cancel ⇒ Object
- #limit(limit) ⇒ Object
- #pause ⇒ Object
- #play ⇒ Object
- #remove ⇒ Object
- #stop_trial_period ⇒ Object
- #unlimit ⇒ Object
- #update_amount_once(amount) ⇒ Object
- #update_amount_permanently(amount) ⇒ Object
- #update_offer_with_refund(offer) ⇒ Object
- #update_offer_with_refund_and_capture_date(offer) ⇒ Object
- #update_offer_without_changes(offer) ⇒ Object
Methods included from Restful::Delete
Methods included from Restful::Update
Methods inherited from Base
Methods included from Restful::All
Methods included from Restful::Find
Methods included from Restful::Create
Constructor Details
This class inherits a constructor from Paymill::Base
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
8 9 10 |
# File 'lib/paymill/models/subscription.rb', line 8 def amount @amount end |
#canceled_at ⇒ Object (readonly)
Returns the value of attribute canceled_at.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def canceled_at @canceled_at end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def client @client end |
#currency ⇒ Object
Returns the value of attribute currency.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def currency @currency end |
#end_of_period ⇒ Object (readonly)
Returns the value of attribute end_of_period.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def end_of_period @end_of_period end |
#interval ⇒ Object
Returns the value of attribute interval.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def interval @interval end |
#is_canceled ⇒ Object (readonly)
Returns the value of attribute is_canceled.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def is_canceled @is_canceled end |
#is_deleted ⇒ Object (readonly)
Returns the value of attribute is_deleted.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def is_deleted @is_deleted end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def livemode @livemode end |
#mandate_reference ⇒ Object (readonly)
Returns the value of attribute mandate_reference.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def mandate_reference @mandate_reference end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def name @name end |
#next_capture_at ⇒ Object (readonly)
Returns the value of attribute next_capture_at.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def next_capture_at @next_capture_at end |
#offer ⇒ Object
Returns the value of attribute offer.
8 9 10 |
# File 'lib/paymill/models/subscription.rb', line 8 def offer @offer end |
#payment ⇒ Object
Returns the value of attribute payment.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def payment @payment end |
#period_of_validity ⇒ Object
Returns the value of attribute period_of_validity.
8 9 10 |
# File 'lib/paymill/models/subscription.rb', line 8 def period_of_validity @period_of_validity end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def status @status end |
#temp_amount ⇒ Object (readonly)
Returns the value of attribute temp_amount.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def temp_amount @temp_amount end |
#trial_end ⇒ Object
Returns the value of attribute trial_end.
8 9 10 |
# File 'lib/paymill/models/subscription.rb', line 8 def trial_end @trial_end end |
#trial_start ⇒ Object (readonly)
Returns the value of attribute trial_start.
6 7 8 |
# File 'lib/paymill/models/subscription.rb', line 6 def trial_start @trial_start end |
Instance Method Details
#cancel ⇒ Object
87 88 89 |
# File 'lib/paymill/models/subscription.rb', line 87 def cancel() delete( remove: false ) end |
#limit(limit) ⇒ Object
68 69 70 71 72 73 |
# File 'lib/paymill/models/subscription.rb', line 68 def limit( limit ) @offer = nil @amount = nil @period_of_validity = limit update() end |
#pause ⇒ Object
75 76 77 78 79 |
# File 'lib/paymill/models/subscription.rb', line 75 def pause() @offer = nil @amount = nil update( pause: true ) end |
#play ⇒ Object
81 82 83 84 85 |
# File 'lib/paymill/models/subscription.rb', line 81 def play() @offer = nil @amount = nil update( pause: false ) end |
#remove ⇒ Object
91 92 93 |
# File 'lib/paymill/models/subscription.rb', line 91 def remove() delete( remove: true ) end |
#stop_trial_period ⇒ Object
54 55 56 57 58 59 |
# File 'lib/paymill/models/subscription.rb', line 54 def stop_trial_period() @offer = nil @amount = nil @trial_end = nil update( trial_end: false ) end |
#unlimit ⇒ Object
61 62 63 64 65 66 |
# File 'lib/paymill/models/subscription.rb', line 61 def unlimit() @offer = nil @amount = nil @period_of_validity = 'remove' update() end |
#update_amount_once(amount) ⇒ Object
34 35 36 |
# File 'lib/paymill/models/subscription.rb', line 34 def update_amount_once( amount ) update_amount( amount, 0 ) end |
#update_amount_permanently(amount) ⇒ Object
38 39 40 |
# File 'lib/paymill/models/subscription.rb', line 38 def update_amount_permanently( amount ) update_amount( amount, 1 ) end |
#update_offer_with_refund(offer) ⇒ Object
46 47 48 |
# File 'lib/paymill/models/subscription.rb', line 46 def update_offer_with_refund( offer ) update_offer( offer, 1 ) end |
#update_offer_with_refund_and_capture_date(offer) ⇒ Object
50 51 52 |
# File 'lib/paymill/models/subscription.rb', line 50 def update_offer_with_refund_and_capture_date( offer ) update_offer( offer, 2 ) end |
#update_offer_without_changes(offer) ⇒ Object
42 43 44 |
# File 'lib/paymill/models/subscription.rb', line 42 def update_offer_without_changes( offer ) update_offer( offer, 0 ) end |