Sha256: f7014da03827c1849d1a379a977c3a9a1563c33c18cc2edee3c1c89df1a83633
Contents?: true
Size: 710 Bytes
Versions: 9
Compression:
Stored size: 710 Bytes
Contents
module RubyPsigate class RecurringItem include HashVariables hashable %w( ProductID Description Quantity Price Tax1 Tax2 ) attr_accessor :product_id, :description, :quantity, :price, :tax1, :tax2, :cost alias_method :productid, :product_id def initialize(attributes = {}) @product_id = attributes[:product_id] @description = attributes[:description] @quantity = attributes[:quantity] @price = attributes[:price] @tax1 = attributes[:tax1] @tax2 = attributes[:tax2] end def to_hash result = super result = result.delete_if { |key, value| value.nil? } # Delete empty hash values result end end end
Version data entries
9 entries across 9 versions & 1 rubygems