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) ⇒ 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) ⇒ OfferSignupPage
Returns a new instance of OfferSignupPage.
65 66 67 68 69 70 71 72 73 |
# 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) @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.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/advanced_billing/models/offer_signup_page.rb', line 76 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 # Create object from extracted values. OfferSignupPage.new(id, nickname, enabled, return_url, return_params, url) 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 |