Class: Gonebusy::UpdatePricingModelByIdBody
- Defined in:
- lib/gonebusy/models/update_pricing_model_by_id_body.rb
Instance Attribute Summary collapse
-
#currency ⇒ String
3 Letter ISO Currency Code.
-
#name ⇒ String
PricingModel Name.
-
#notes ⇒ String
Optional Notes Field.
-
#price ⇒ Float
Price.
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.
Instance Method Summary collapse
-
#initialize(name = nil, notes = nil, price = nil, currency = nil) ⇒ UpdatePricingModelByIdBody
constructor
A new instance of UpdatePricingModelByIdBody.
Methods inherited from BaseModel
Constructor Details
#initialize(name = nil, notes = nil, price = nil, currency = nil) ⇒ UpdatePricingModelByIdBody
Returns a new instance of UpdatePricingModelByIdBody.
33 34 35 36 37 38 39 40 41 |
# File 'lib/gonebusy/models/update_pricing_model_by_id_body.rb', line 33 def initialize(name = nil, notes = nil, price = nil, currency = nil) @name = name @notes = notes @price = price @currency = currency end |
Instance Attribute Details
#currency ⇒ String
3 Letter ISO Currency Code
19 20 21 |
# File 'lib/gonebusy/models/update_pricing_model_by_id_body.rb', line 19 def currency @currency end |
#name ⇒ String
PricingModel Name
7 8 9 |
# File 'lib/gonebusy/models/update_pricing_model_by_id_body.rb', line 7 def name @name end |
#notes ⇒ String
Optional Notes Field
11 12 13 |
# File 'lib/gonebusy/models/update_pricing_model_by_id_body.rb', line 11 def notes @notes end |
#price ⇒ Float
Price
15 16 17 |
# File 'lib/gonebusy/models/update_pricing_model_by_id_body.rb', line 15 def price @price end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/gonebusy/models/update_pricing_model_by_id_body.rb', line 44 def self.from_hash(hash) return nil unless hash # Extract variables from the hash name = hash['name'] notes = hash['notes'] price = hash['price'] currency = hash['currency'] # Create object from extracted values UpdatePricingModelByIdBody.new(name, notes, price, currency) end |
.names ⇒ Object
A mapping from model property names to API property names
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/gonebusy/models/update_pricing_model_by_id_body.rb', line 22 def self.names if @_hash.nil? @_hash = {} @_hash["name"] = "name" @_hash["notes"] = "notes" @_hash["price"] = "price" @_hash["currency"] = "currency" end @_hash end |