Class: AdvancedBilling::SubscriptionGroupSubscriptionError
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::SubscriptionGroupSubscriptionError
- Defined in:
- lib/advanced_billing/models/subscription_group_subscription_error.rb
Overview
Object which contains subscription errors.
Instance Attribute Summary collapse
-
#base ⇒ Array[String]
TODO: Write general description for this method.
-
#payment_profile ⇒ Array[String]
TODO: Write general description for this method.
-
#payment_profile_chargify_token ⇒ Array[String]
TODO: Write general description for this method.
-
#payment_profile_expiration_month ⇒ Array[String]
TODO: Write general description for this method.
-
#payment_profile_expiration_year ⇒ Array[String]
TODO: Write general description for this method.
-
#payment_profile_full_number ⇒ Array[String]
TODO: Write general description for this method.
-
#product ⇒ Array[String]
TODO: Write general description for this method.
-
#product_price_point_id ⇒ Array[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(product: SKIP, product_price_point_id: SKIP, payment_profile: SKIP, payment_profile_chargify_token: SKIP, base: SKIP, payment_profile_expiration_month: SKIP, payment_profile_expiration_year: SKIP, payment_profile_full_number: SKIP, additional_properties: {}) ⇒ SubscriptionGroupSubscriptionError
constructor
A new instance of SubscriptionGroupSubscriptionError.
Methods inherited from BaseModel
Constructor Details
#initialize(product: SKIP, product_price_point_id: SKIP, payment_profile: SKIP, payment_profile_chargify_token: SKIP, base: SKIP, payment_profile_expiration_month: SKIP, payment_profile_expiration_year: SKIP, payment_profile_full_number: SKIP, additional_properties: {}) ⇒ SubscriptionGroupSubscriptionError
Returns a new instance of SubscriptionGroupSubscriptionError.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 80 def initialize(product: SKIP, product_price_point_id: SKIP, payment_profile: SKIP, payment_profile_chargify_token: SKIP, base: SKIP, payment_profile_expiration_month: SKIP, payment_profile_expiration_year: SKIP, payment_profile_full_number: SKIP, additional_properties: {}) @product = product unless product == SKIP @product_price_point_id = product_price_point_id unless product_price_point_id == SKIP @payment_profile = payment_profile unless payment_profile == SKIP unless payment_profile_chargify_token == SKIP @payment_profile_chargify_token = payment_profile_chargify_token end @base = base unless base == SKIP unless payment_profile_expiration_month == SKIP @payment_profile_expiration_month = payment_profile_expiration_month end unless payment_profile_expiration_year == SKIP @payment_profile_expiration_year = payment_profile_expiration_year end unless payment_profile_full_number == SKIP @payment_profile_full_number = payment_profile_full_number end # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end end |
Instance Attribute Details
#base ⇒ Array[String]
TODO: Write general description for this method
30 31 32 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 30 def base @base end |
#payment_profile ⇒ Array[String]
TODO: Write general description for this method
22 23 24 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 22 def payment_profile @payment_profile end |
#payment_profile_chargify_token ⇒ Array[String]
TODO: Write general description for this method
26 27 28 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 26 def payment_profile_chargify_token @payment_profile_chargify_token end |
#payment_profile_expiration_month ⇒ Array[String]
TODO: Write general description for this method
34 35 36 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 34 def payment_profile_expiration_month @payment_profile_expiration_month end |
#payment_profile_expiration_year ⇒ Array[String]
TODO: Write general description for this method
38 39 40 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 38 def payment_profile_expiration_year @payment_profile_expiration_year end |
#payment_profile_full_number ⇒ Array[String]
TODO: Write general description for this method
42 43 44 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 42 def payment_profile_full_number @payment_profile_full_number end |
#product ⇒ Array[String]
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 14 def product @product end |
#product_price_point_id ⇒ Array[String]
TODO: Write general description for this method
18 19 20 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 18 def product_price_point_id @product_price_point_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 143 144 145 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 113 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. product = hash.key?('product') ? hash['product'] : SKIP product_price_point_id = hash.key?('product_price_point_id') ? hash['product_price_point_id'] : SKIP payment_profile = hash.key?('payment_profile') ? hash['payment_profile'] : SKIP payment_profile_chargify_token = hash.key?('payment_profile.chargify_token') ? hash['payment_profile.chargify_token'] : SKIP base = hash.key?('base') ? hash['base'] : SKIP payment_profile_expiration_month = hash.key?('payment_profile.expiration_month') ? hash['payment_profile.expiration_month'] : SKIP payment_profile_expiration_year = hash.key?('payment_profile.expiration_year') ? hash['payment_profile.expiration_year'] : SKIP payment_profile_full_number = hash.key?('payment_profile.full_number') ? hash['payment_profile.full_number'] : SKIP # Clean out expected properties from Hash. names.each_value { |k| hash.delete(k) } # Create object from extracted values. SubscriptionGroupSubscriptionError.new(product: product, product_price_point_id: product_price_point_id, payment_profile: payment_profile, payment_profile_chargify_token: payment_profile_chargify_token, base: base, payment_profile_expiration_month: payment_profile_expiration_month, payment_profile_expiration_year: payment_profile_expiration_year, payment_profile_full_number: payment_profile_full_number, additional_properties: hash) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['product'] = 'product' @_hash['product_price_point_id'] = 'product_price_point_id' @_hash['payment_profile'] = 'payment_profile' @_hash['payment_profile_chargify_token'] = 'payment_profile.chargify_token' @_hash['base'] = 'base' @_hash['payment_profile_expiration_month'] = 'payment_profile.expiration_month' @_hash['payment_profile_expiration_year'] = 'payment_profile.expiration_year' @_hash['payment_profile_full_number'] = 'payment_profile.full_number' @_hash end |
.nullables ⇒ Object
An array for nullable fields
76 77 78 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 76 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 62 def self.optionals %w[ product product_price_point_id payment_profile payment_profile_chargify_token base payment_profile_expiration_month payment_profile_expiration_year payment_profile_full_number ] end |