Sha256: dad918d1651959c7e57365a9992c1c6b24425cca5705aab06e160dcf74aa083c

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

module BluepanClient
  class CreateRemittanceRequest < BaseRequest

    PATH = "/v1/:api_token/remittances"

    attribute :paymethod, String
    attribute :dest_currency, String
    attribute :amount, Float
    attribute :recipientseq, Integer
    attribute :strategyseq, Integer
    attribute :provinceseq, Integer
    attribute :cityseq, Integer
    attribute :accountname, String
    attribute :accountnumber, String
    attribute :branch, String
    attribute :alipayid, String
    attribute :wechatid, String
    attribute :nick, String
    attribute :payment_url, String
    attribute :payment_account, String
    attribute :payment_password, String

    def call
      HTTParty.post(uri, {
        body: attributes.slice(*%i[
          api_secret
          paymethod
          dest_currency
          amount
          recipientseq
          strategyseq
          provinceseq
          cityseq
          accountname
          accountnumber
          branch
          alipayid
          wechatid
          nick
          payment_url
          payment_account
          payment_password
        ])
      })
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bluepan_client-1.0.0 lib/bluepan_client/requests/create_remittance_request.rb
bluepan_client-0.4.0 lib/bluepan_client/requests/create_remittance_request.rb