Sha256: ed898a5ee1ab0e05278cbbfee820b52c0dc3b61fbc8ede7a6b8689135f783189

Contents?: true

Size: 702 Bytes

Versions: 3

Compression:

Stored size: 702 Bytes

Contents

# -*- encoding: utf-8 -*-
module NissenCollect

  class Transaction < Action
    attr_accessor :httpInfo,:buyer,:deliveries
    @@transaction_path = 'direct/autotransaction.do'

    # @bodyを初期化する
    # @param [Hash] body 生成時引数
    def initialize
      super
      @httpInfo = Marshal.load(Marshal.dump(HTTPINFO))
      @buyer = Marshal.load(Marshal.dump(BUYER))
      @deliveries = Marshal.load(Marshal.dump(DELIVERIES))
    end

    # APIコールを行う
    def call
      body = [@@shopInfo,@httpInfo,@buyer,@deliveries].inject {|union,hash| union.merge hash}
      connect = NissenCollect::Client.new
      connect.request('get',@@transaction_path,body)
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nissen-collect-0.1.8 lib/nissen-collect/transaction.rb
nissen-collect-0.1.7 lib/nissen-collect/transaction.rb
nissen-collect-0.1.6 lib/nissen-collect/transaction.rb