lib/nissen-collect/modifytransaction.rb in nissen-collect-0.1.4 vs lib/nissen-collect/modifytransaction.rb in nissen-collect-0.1.5

- old
+ new

@@ -1,21 +1,24 @@ # -*- encoding: utf-8 -*- module NissenCollect - class Modifytransaction - attr_accessor :body + class Modifytransaction < Action + attr_accessor :buyer,:deliveries @@transaction_path = 'direct/automodifytransaction.do' # @bodyを初期化する # @param [Hash] body 生成時引数 - def initialize body=nil - @body = body ? body : [SHOPINFO,BUYER,DELIVERIES].inject {|union,hash| union.merge hash} + def initialize + super + @buyer = BUYER + @deliveries = DELIVERIES end # APIコールを行う def call + body = [@@shopInfo,@buyer,@deliveries].inject {|union,hash| union.merge hash} connect = NissenCollect::Client.new - connect.request('get',@@transaction_path,@body) + connect.request('get',@@transaction_path,body) end end end