Class: AdvancedBilling::PublicSignupPage
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::PublicSignupPage
- Defined in:
- lib/advanced_billing/models/public_signup_page.rb
Overview
PublicSignupPage Model.
Instance Attribute Summary collapse
-
#id ⇒ Integer
The id of the signup page (public_signup_pages only).
-
#return_params ⇒ String
The params to be appended to the return_url (public_signup_pages only).
-
#return_url ⇒ String
The url to which a customer will be returned after a successful signup (public_signup_pages only).
-
#url ⇒ String
The url where the signup page can be viewed (public_signup_pages only).
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, return_url: SKIP, return_params: SKIP, url: SKIP, additional_properties: {}) ⇒ PublicSignupPage
constructor
A new instance of PublicSignupPage.
Methods inherited from BaseModel
Constructor Details
#initialize(id: SKIP, return_url: SKIP, return_params: SKIP, url: SKIP, additional_properties: {}) ⇒ PublicSignupPage
Returns a new instance of PublicSignupPage.
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/advanced_billing/models/public_signup_page.rb', line 57 def initialize(id: SKIP, return_url: SKIP, return_params: SKIP, url: SKIP, additional_properties: {}) @id = id unless id == 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
#id ⇒ Integer
The id of the signup page (public_signup_pages only)
14 15 16 |
# File 'lib/advanced_billing/models/public_signup_page.rb', line 14 def id @id end |
#return_params ⇒ String
The params to be appended to the return_url (public_signup_pages only)
23 24 25 |
# File 'lib/advanced_billing/models/public_signup_page.rb', line 23 def return_params @return_params end |
#return_url ⇒ String
The url to which a customer will be returned after a successful signup (public_signup_pages only)
19 20 21 |
# File 'lib/advanced_billing/models/public_signup_page.rb', line 19 def return_url @return_url end |
#url ⇒ String
The url where the signup page can be viewed (public_signup_pages only)
27 28 29 |
# File 'lib/advanced_billing/models/public_signup_page.rb', line 27 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/advanced_billing/models/public_signup_page.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : 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. PublicSignupPage.new(id: id, 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.
30 31 32 33 34 35 36 37 |
# File 'lib/advanced_billing/models/public_signup_page.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['return_url'] = 'return_url' @_hash['return_params'] = 'return_params' @_hash['url'] = 'url' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 53 54 55 |
# File 'lib/advanced_billing/models/public_signup_page.rb', line 50 def self.nullables %w[ return_url return_params ] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/advanced_billing/models/public_signup_page.rb', line 40 def self.optionals %w[ id return_url return_params url ] end |