通过 SOAP 关闭 Zuora 的会计期间



我正在尝试调用 Zuora Soap API 的更新方法,以便"关闭会计期"。正确的方法是什么

    require 'savon'
    message = {'username' => 'username','password' => 'password'  }
   client = Savon.client(wsdl: 'zuora.a.75.0.wsdl')
   response = client.call(:login, message: message)
    @response = client.call :update do
    soap.header = {
    }
    soap.body = {
                 :Status=> "closed", 
                 :ids=>"4028e699235ea4de0123777131fd5d68"
                }
     end    

Zuora 肥皂看起来像这样:

    <?xml version='1.0' encoding='UTF-8'?>
    <soapenv:Envelope xmlns:soapenv=
    "http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header>
    <ns1:SessionHeader xmlns:ns1=
    "http://api.zuora.com/"  soapenv:mustUnderstand="0">
    <ns1:session>[replace with your session]</ns1:session>
    </ns1:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
    <ns1:update xmlns:ns1="http://api.zuora.com/">
     <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   
     xsi:type="ns2:AccountingPeriod">
   <ns2:Id>402892a83711418b01371142cc5801a9</ns2:Id>
   <ns2:Status>Closed</ns2:Status>
   </ns1:zObjects>
   </ns1:update>
   </soapenv:Body>
   </soapenv:Envelope>

这个例子是正确的

所需的最低数据是

  • 会话密钥
  • 会计期间的 32 个字符 ID
  • 状态"已关闭"

最新更新