Class: Asdawqw::ReservationCommissionsNotificationModel
- Defined in:
- lib/asdawqw/models/reservation_commissions_notification_model.rb
Overview
ReservationCommissionsNotificationModel Model.
Instance Attribute Summary collapse
-
#bp_commission ⇒ Float
BookingPal commission.
-
#channel_commission ⇒ Float
Channel commission.
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(channel_commission = nil, bp_commission = nil) ⇒ ReservationCommissionsNotificationModel
constructor
A new instance of ReservationCommissionsNotificationModel.
Methods inherited from BaseModel
Constructor Details
#initialize(channel_commission = nil, bp_commission = nil) ⇒ ReservationCommissionsNotificationModel
Returns a new instance of ReservationCommissionsNotificationModel.
25 26 27 28 29 |
# File 'lib/asdawqw/models/reservation_commissions_notification_model.rb', line 25 def initialize(channel_commission = nil, bp_commission = nil) @channel_commission = channel_commission @bp_commission = bp_commission end |
Instance Attribute Details
#bp_commission ⇒ Float
BookingPal commission
15 16 17 |
# File 'lib/asdawqw/models/reservation_commissions_notification_model.rb', line 15 def bp_commission @bp_commission end |
#channel_commission ⇒ Float
Channel commission
11 12 13 |
# File 'lib/asdawqw/models/reservation_commissions_notification_model.rb', line 11 def channel_commission @channel_commission end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/asdawqw/models/reservation_commissions_notification_model.rb', line 32 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. channel_commission = hash['channelCommission'] bp_commission = hash['bpCommission'] # Create object from extracted values. ReservationCommissionsNotificationModel.new(channel_commission, bp_commission) end |
.names ⇒ Object
A mapping from model property names to API property names.
18 19 20 21 22 23 |
# File 'lib/asdawqw/models/reservation_commissions_notification_model.rb', line 18 def self.names @_hash = {} if @_hash.nil? @_hash['channel_commission'] = 'channelCommission' @_hash['bp_commission'] = 'bpCommission' @_hash end |