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.
Methods inherited from BaseModel
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: {}) @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 # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end 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. names.each_value { |k| hash.delete(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: hash) 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 |