class Beaver::PartnerService
PartnerService
Model.
Attributes
currency[RW]
TODO: Write general description for this method @return [CurrencyEnum]
service_monthly_cost[RW]
TODO: Write general description for this method @return [Integer]
service_name[RW]
TODO: Write general description for this method @return [String]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/partner_service.rb, line 39 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. service_name = hash['service_name'] currency = hash['currency'] service_monthly_cost = hash['service_monthly_cost'] # Create object from extracted values. PartnerService.new(service_name, currency, service_monthly_cost) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/partner_service.rb, line 22 def self.names @_hash = {} if @_hash.nil? @_hash['currency'] = 'currency' @_hash['service_monthly_cost'] = 'service_monthly_cost' @_hash['service_name'] = 'service_name' @_hash end
new(service_name = nil, currency = nil, service_monthly_cost = nil)
click to toggle source
# File lib/beaver/models/partner_service.rb, line 30 def initialize(service_name = nil, currency = nil, service_monthly_cost = nil) @currency = currency @service_monthly_cost = service_monthly_cost @service_name = service_name end