Class: AdvancedBilling::ReactivateSubscriptionGroupResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::ReactivateSubscriptionGroupResponse
- Defined in:
- lib/advanced_billing/models/reactivate_subscription_group_response.rb
Overview
ReactivateSubscriptionGroupResponse Model.
Instance Attribute Summary collapse
-
#cancel_at_end_of_period ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#customer_id ⇒ Integer
TODO: Write general description for this method.
-
#next_assessment_at ⇒ DateTime
TODO: Write general description for this method.
-
#payment_profile_id ⇒ Integer
TODO: Write general description for this method.
-
#primary_subscription_id ⇒ Integer
TODO: Write general description for this method.
-
#scheme ⇒ Integer
TODO: Write general description for this method.
-
#state ⇒ String
TODO: Write general description for this method.
-
#subscription_ids ⇒ Array[Integer]
TODO: Write general description for this method.
-
#uid ⇒ String
TODO: Write general description for this method.
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(uid: SKIP, scheme: SKIP, customer_id: SKIP, payment_profile_id: SKIP, subscription_ids: SKIP, primary_subscription_id: SKIP, next_assessment_at: SKIP, state: SKIP, cancel_at_end_of_period: SKIP, additional_properties: {}) ⇒ ReactivateSubscriptionGroupResponse
constructor
A new instance of ReactivateSubscriptionGroupResponse.
- #to_custom_next_assessment_at ⇒ Object
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(uid: SKIP, scheme: SKIP, customer_id: SKIP, payment_profile_id: SKIP, subscription_ids: SKIP, primary_subscription_id: SKIP, next_assessment_at: SKIP, state: SKIP, cancel_at_end_of_period: SKIP, additional_properties: {}) ⇒ ReactivateSubscriptionGroupResponse
Returns a new instance of ReactivateSubscriptionGroupResponse.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 84 def initialize(uid: SKIP, scheme: SKIP, customer_id: SKIP, payment_profile_id: SKIP, subscription_ids: SKIP, primary_subscription_id: SKIP, next_assessment_at: SKIP, state: SKIP, cancel_at_end_of_period: SKIP, additional_properties: {}) # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end @uid = uid unless uid == SKIP @scheme = scheme unless scheme == SKIP @customer_id = customer_id unless customer_id == SKIP @payment_profile_id = payment_profile_id unless payment_profile_id == SKIP @subscription_ids = subscription_ids unless subscription_ids == SKIP @primary_subscription_id = primary_subscription_id unless primary_subscription_id == SKIP @next_assessment_at = next_assessment_at unless next_assessment_at == SKIP @state = state unless state == SKIP @cancel_at_end_of_period = cancel_at_end_of_period unless cancel_at_end_of_period == SKIP end |
Instance Attribute Details
#cancel_at_end_of_period ⇒ TrueClass | FalseClass
TODO: Write general description for this method
47 48 49 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 47 def cancel_at_end_of_period @cancel_at_end_of_period end |
#customer_id ⇒ Integer
TODO: Write general description for this method
23 24 25 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 23 def customer_id @customer_id end |
#next_assessment_at ⇒ DateTime
TODO: Write general description for this method
39 40 41 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 39 def next_assessment_at @next_assessment_at end |
#payment_profile_id ⇒ Integer
TODO: Write general description for this method
27 28 29 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 27 def payment_profile_id @payment_profile_id end |
#primary_subscription_id ⇒ Integer
TODO: Write general description for this method
35 36 37 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 35 def primary_subscription_id @primary_subscription_id end |
#scheme ⇒ Integer
TODO: Write general description for this method
19 20 21 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 19 def scheme @scheme end |
#state ⇒ String
TODO: Write general description for this method
43 44 45 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 43 def state @state end |
#subscription_ids ⇒ Array[Integer]
TODO: Write general description for this method
31 32 33 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 31 def subscription_ids @subscription_ids end |
#uid ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 15 def uid @uid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 106 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. uid = hash.key?('uid') ? hash['uid'] : SKIP scheme = hash.key?('scheme') ? hash['scheme'] : SKIP customer_id = hash.key?('customer_id') ? hash['customer_id'] : SKIP payment_profile_id = hash.key?('payment_profile_id') ? hash['payment_profile_id'] : SKIP subscription_ids = hash.key?('subscription_ids') ? hash['subscription_ids'] : SKIP primary_subscription_id = hash.key?('primary_subscription_id') ? hash['primary_subscription_id'] : SKIP next_assessment_at = if hash.key?('next_assessment_at') (DateTimeHelper.from_rfc3339(hash['next_assessment_at']) if hash['next_assessment_at']) else SKIP end state = hash.key?('state') ? hash['state'] : SKIP cancel_at_end_of_period = hash.key?('cancel_at_end_of_period') ? hash['cancel_at_end_of_period'] : SKIP # Clean out expected properties from Hash. additional_properties = hash.reject { |k, _| names.value?(k) } # Create object from extracted values. ReactivateSubscriptionGroupResponse.new(uid: uid, scheme: scheme, customer_id: customer_id, payment_profile_id: payment_profile_id, subscription_ids: subscription_ids, primary_subscription_id: primary_subscription_id, next_assessment_at: next_assessment_at, state: state, cancel_at_end_of_period: cancel_at_end_of_period, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 50 def self.names @_hash = {} if @_hash.nil? @_hash['uid'] = 'uid' @_hash['scheme'] = 'scheme' @_hash['customer_id'] = 'customer_id' @_hash['payment_profile_id'] = 'payment_profile_id' @_hash['subscription_ids'] = 'subscription_ids' @_hash['primary_subscription_id'] = 'primary_subscription_id' @_hash['next_assessment_at'] = 'next_assessment_at' @_hash['state'] = 'state' @_hash['cancel_at_end_of_period'] = 'cancel_at_end_of_period' @_hash end |
.nullables ⇒ Object
An array for nullable fields
80 81 82 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 80 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 65 def self.optionals %w[ uid scheme customer_id payment_profile_id subscription_ids primary_subscription_id next_assessment_at state cancel_at_end_of_period ] end |
Instance Method Details
#to_custom_next_assessment_at ⇒ Object
144 145 146 |
# File 'lib/advanced_billing/models/reactivate_subscription_group_response.rb', line 144 def to_custom_next_assessment_at DateTimeHelper.to_rfc3339(next_assessment_at) end |