Class: AdvancedBilling::SubscriptionGroupSignupError
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::SubscriptionGroupSignupError
- Defined in:
- lib/advanced_billing/models/subscription_group_signup_error.rb
Overview
SubscriptionGroupSignupError Model.
Instance Attribute Summary collapse
-
#payer ⇒ PayerError
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
-
#payer_id ⇒ String
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
-
#payer_reference ⇒ String
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
-
#payment_profile_id ⇒ String
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
-
#subscription_group ⇒ Array[String]
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
-
#subscriptions ⇒ Hash[String, SubscriptionGroupSubscriptionError]
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
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(subscriptions: SKIP, payer_reference: SKIP, payer: SKIP, subscription_group: SKIP, payment_profile_id: SKIP, payer_id: SKIP, additional_properties: {}) ⇒ SubscriptionGroupSignupError
constructor
A new instance of SubscriptionGroupSignupError.
Methods inherited from BaseModel
Constructor Details
#initialize(subscriptions: SKIP, payer_reference: SKIP, payer: SKIP, subscription_group: SKIP, payment_profile_id: SKIP, payer_id: SKIP, additional_properties: {}) ⇒ SubscriptionGroupSignupError
Returns a new instance of SubscriptionGroupSignupError.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 71 def initialize(subscriptions: SKIP, payer_reference: SKIP, payer: SKIP, subscription_group: SKIP, payment_profile_id: SKIP, payer_id: SKIP, additional_properties: {}) @subscriptions = subscriptions unless subscriptions == SKIP @payer_reference = payer_reference unless payer_reference == SKIP @payer = payer unless payer == SKIP @subscription_group = subscription_group unless subscription_group == SKIP @payment_profile_id = payment_profile_id unless payment_profile_id == SKIP @payer_id = payer_id unless payer_id == SKIP # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end end |
Instance Attribute Details
#payer ⇒ PayerError
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
25 26 27 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 25 def payer @payer end |
#payer_id ⇒ String
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
40 41 42 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 40 def payer_id @payer_id end |
#payer_reference ⇒ String
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
20 21 22 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 20 def payer_reference @payer_reference end |
#payment_profile_id ⇒ String
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
35 36 37 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 35 def payment_profile_id @payment_profile_id end |
#subscription_group ⇒ Array[String]
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
30 31 32 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 30 def subscription_group @subscription_group end |
#subscriptions ⇒ Hash[String, SubscriptionGroupSubscriptionError]
Object that as key have subscription position in request subscriptions array and as value subscription errors object.
15 16 17 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 15 def subscriptions @subscriptions end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 88 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. subscriptions = SubscriptionGroupSubscriptionError.from_hash(hash['subscriptions']) if hash['subscriptions'] subscriptions = SKIP unless hash.key?('subscriptions') payer_reference = hash.key?('payer_reference') ? hash['payer_reference'] : SKIP payer = PayerError.from_hash(hash['payer']) if hash['payer'] subscription_group = hash.key?('subscription_group') ? hash['subscription_group'] : SKIP payment_profile_id = hash.key?('payment_profile_id') ? hash['payment_profile_id'] : SKIP payer_id = hash.key?('payer_id') ? hash['payer_id'] : SKIP # Clean out expected properties from Hash. names.each_value { |k| hash.delete(k) } # Create object from extracted values. SubscriptionGroupSignupError.new(subscriptions: subscriptions, payer_reference: payer_reference, payer: payer, subscription_group: subscription_group, payment_profile_id: payment_profile_id, payer_id: payer_id, additional_properties: hash) end |
.names ⇒ Object
A mapping from model property names to API property names.
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 43 def self.names @_hash = {} if @_hash.nil? @_hash['subscriptions'] = 'subscriptions' @_hash['payer_reference'] = 'payer_reference' @_hash['payer'] = 'payer' @_hash['subscription_group'] = 'subscription_group' @_hash['payment_profile_id'] = 'payment_profile_id' @_hash['payer_id'] = 'payer_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/advanced_billing/models/subscription_group_signup_error.rb', line 55 def self.optionals %w[ subscriptions payer_reference payer subscription_group payment_profile_id payer_id ] end |