Sha256: ba427276f66b0441900f9d7287fe4f8fe8322f653881614f2caf64a24e0d59a8

Contents?: true

Size: 883 Bytes

Versions: 20

Compression:

Stored size: 883 Bytes

Contents

class OrderInformation
  include Mongoid::Document
  
  field :orderNumber, type: String
  field :fills, type: Integer
  field :quantityOrdered, type: Hash
  field :orderExpirationDateTime, type: Integer
  field :orderDateTime, type: Integer
  
  belongs_to :provider
  
  alias :order_number :orderNumber
  alias :order_number= :orderNumber=
  alias :quantity_ordered :quantityOrdered
  alias :quantity_ordered= :quantityOrdered=
  alias :order_expiration_date_time :orderExpirationDateTime
  alias :order_expiration_date_time= :orderExpirationDateTime=
  alias :order_date_time :orderDateTime
  alias :order_date_time= :orderDateTime=


  def shift_dates(date_diff)
    self.orderDateTime = self.orderDateTime.nil? ? nil : self.orderDateTime + date_diff
    self.orderExpirationDateTime = self.orderExpirationDateTime.nil? ? nil : self.orderExpirationDateTime + date_diff
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
health-data-standards-3.4.6 lib/health-data-standards/models/order_information.rb
health-data-standards-3.4.5 lib/health-data-standards/models/order_information.rb
health-data-standards-3.4.4 lib/health-data-standards/models/order_information.rb
health-data-standards-3.4.3 lib/health-data-standards/models/order_information.rb
health-data-standards-3.4.2 lib/health-data-standards/models/order_information.rb
health-data-standards-3.4.1 lib/health-data-standards/models/order_information.rb
health-data-standards-3.4.0 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.12 lib/health-data-standards/models/order_information.rb
health-data-standards-3.3.0 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.11 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.10 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.8 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.7 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.6 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.5 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.4 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.3 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.2 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.1 lib/health-data-standards/models/order_information.rb
health-data-standards-3.2.0 lib/health-data-standards/models/order_information.rb