Class: AdvancedBilling::OfferSignupPage
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::OfferSignupPage
- Defined in:
- lib/advanced_billing/models/offer_signup_page.rb
Overview
OfferSignupPage Model.
Instance Attribute Summary collapse
-
#enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#id ⇒ Integer
TODO: Write general description for this method.
-
#nickname ⇒ String
TODO: Write general description for this method.
-
#return_params ⇒ String
TODO: Write general description for this method.
-
#return_url ⇒ String
TODO: Write general description for this method.
-
#url ⇒ 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(id: SKIP, nickname: SKIP, enabled: SKIP, return_url: SKIP, return_params: SKIP, url: SKIP, additional_properties: {}) ⇒ OfferSignupPage
constructor
A new instance of OfferSignupPage.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #get_additional_properties, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(id: SKIP, nickname: SKIP, enabled: SKIP, return_url: SKIP, return_params: SKIP, url: SKIP, additional_properties: {}) ⇒ OfferSignupPage
Returns a new instance of OfferSignupPage.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 65 def initialize(id: SKIP, nickname: SKIP, enabled: SKIP, return_url: SKIP, return_params: SKIP, url: SKIP, additional_properties: {}) # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end @id = id unless id == SKIP @nickname = nickname unless nickname == SKIP @enabled = enabled unless enabled == SKIP @return_url = return_url unless return_url == SKIP @return_params = return_params unless return_params == SKIP @url = url unless url == SKIP end |
Instance Attribute Details
#enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method
22 23 24 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 22 def enabled @enabled end |
#id ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 14 def id @id end |
#nickname ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 18 def nickname @nickname end |
#return_params ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 30 def return_params @return_params end |
#return_url ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 26 def return_url @return_url end |
#url ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 34 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
81 82 83 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/offer_signup_page.rb', line 81 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP nickname = hash.key?('nickname') ? hash['nickname'] : SKIP enabled = hash.key?('enabled') ? hash['enabled'] : SKIP return_url = hash.key?('return_url') ? hash['return_url'] : SKIP return_params = hash.key?('return_params') ? hash['return_params'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP # Clean out expected properties from Hash. additional_properties = hash.reject { |k, _| names.value?(k) } # Create object from extracted values. OfferSignupPage.new(id: id, nickname: nickname, enabled: enabled, return_url: return_url, return_params: return_params, url: url, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['nickname'] = 'nickname' @_hash['enabled'] = 'enabled' @_hash['return_url'] = 'return_url' @_hash['return_params'] = 'return_params' @_hash['url'] = 'url' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 49 def self.optionals %w[ id nickname enabled return_url return_params url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
114 115 116 117 118 119 120 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 114 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, nickname: #{@nickname.inspect}, enabled:"\ " #{@enabled.inspect}, return_url: #{@return_url.inspect}, return_params:"\ " #{@return_params.inspect}, url: #{@url.inspect}, additional_properties:"\ " #{get_additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
106 107 108 109 110 111 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 106 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, nickname: #{@nickname}, enabled: #{@enabled}, return_url:"\ " #{@return_url}, return_params: #{@return_params}, url: #{@url}, additional_properties:"\ " #{get_additional_properties}>" end |