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
-
#payment_profile ⇒ Array[String]
TODO: Write general description for this method.
-
#payment_profile_chargify_token ⇒ 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) ⇒ 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) ⇒ SubscriptionGroupSubscriptionError
Returns a new instance of SubscriptionGroupSubscriptionError.
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 54 def initialize(product = SKIP, product_price_point_id = SKIP, payment_profile = SKIP, payment_profile_chargify_token = SKIP) @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 end |
Instance Attribute Details
#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 |
#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.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 67 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 # Create object from extracted values. SubscriptionGroupSubscriptionError.new(product, product_price_point_id, payment_profile, payment_profile_chargify_token) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 37 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 29 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 end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/advanced_billing/models/subscription_group_subscription_error.rb', line 40 def self.optionals %w[ product product_price_point_id payment_profile payment_profile_chargify_token ] end |