Sha256: 59874c5152459f3e02aa4e7ba89736165fb20191e2f8e94ce971aaa61bab50f5
Contents?: true
Size: 718 Bytes
Versions: 18
Compression:
Stored size: 718 Bytes
Contents
module Mollie class Order class Shipment < Base attr_accessor :id, :order_id, :created_at, :tracking, :lines, :_links alias links _links def tracking @tracking || OpenStruct.new end def tracking=(tracking) @tracking = OpenStruct.new(tracking) if tracking.is_a?(Hash) end def lines=(lines) @lines = lines.map { |line| Order::Line.new(line) } end def created_at=(created_at) @created_at = Time.parse(created_at.to_s) end def order(options = {}) Order.get(order_id, options) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems