Class: AdvancedBilling::ActivateSubscriptionRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::ActivateSubscriptionRequest
- Defined in:
- lib/advanced_billing/models/activate_subscription_request.rb
Overview
ActivateSubscriptionRequest Model.
Instance Attribute Summary collapse
-
#revert_on_failure ⇒ TrueClass | FalseClass
You may choose how to handle the activation failure.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(revert_on_failure = SKIP) ⇒ ActivateSubscriptionRequest
constructor
A new instance of ActivateSubscriptionRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(revert_on_failure = SKIP) ⇒ ActivateSubscriptionRequest
Returns a new instance of ActivateSubscriptionRequest.
41 42 43 |
# File 'lib/advanced_billing/models/activate_subscription_request.rb', line 41 def initialize(revert_on_failure = SKIP) @revert_on_failure = revert_on_failure unless revert_on_failure == SKIP end |
Instance Attribute Details
#revert_on_failure ⇒ TrueClass | FalseClass
You may choose how to handle the activation failure. true means do not change the subscription’s state and billing period. false means to continue through with the activation and enter an end of life state. If this parameter is omitted or null is passed it will default to value set in the site settings (default: true)
18 19 20 |
# File 'lib/advanced_billing/models/activate_subscription_request.rb', line 18 def revert_on_failure @revert_on_failure end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/advanced_billing/models/activate_subscription_request.rb', line 46 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. revert_on_failure = hash.key?('revert_on_failure') ? hash['revert_on_failure'] : SKIP # Create object from extracted values. ActivateSubscriptionRequest.new(revert_on_failure) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 |
# File 'lib/advanced_billing/models/activate_subscription_request.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['revert_on_failure'] = 'revert_on_failure' @_hash end |
.nullables ⇒ Object
An array for nullable fields
35 36 37 38 39 |
# File 'lib/advanced_billing/models/activate_subscription_request.rb', line 35 def self.nullables %w[ revert_on_failure ] end |
.optionals ⇒ Object
An array for optional fields
28 29 30 31 32 |
# File 'lib/advanced_billing/models/activate_subscription_request.rb', line 28 def self.optionals %w[ revert_on_failure ] end |