zuora_api 1.4.03 → 1.4.04

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d17001d8bec7ae8a138c948cd83bb3ea745a950a
4
- data.tar.gz: e34b68ffedde563ed03a3341a5584c6192994a52
3
+ metadata.gz: af98f69ca6684441b7f56352718e38f0640652e8
4
+ data.tar.gz: 97245482d8621732fe096eaac8fcd58f0d88e5fd
5
5
  SHA512:
6
- metadata.gz: 392624ad1e9ec04f1e033c9c4d0533f7844689b243a64aa8f4531c8d11fe7dbd60887382b13789d313607f77542eee72b8f5fde967bd0cd51b4d2d1e4b31e19e
7
- data.tar.gz: d4330aecd4266250813e763944d0803dcb2c475014bf43d11fe5d60708184e4b4068492ada8030edcdac80999e6883e826dacb830c9525367b94f1d622f7c950
6
+ metadata.gz: 4ac16c28f8c24b5da97c5e71a738bf51da72ff3cb8267b7f0d0654101f4abc6433d8dd016583e7d2dcb218c4f2829f44371fb77623bcf8c147093d8c5c2c771d
7
+ data.tar.gz: 72977137e6a136ee79412a1d1626f210a6953e6daefe50d047c892cbb0755cb19047625b11f48e75c871d3afe66d3a8122a135b7b1c3013f232eaa7a930dcd76
@@ -107,11 +107,12 @@ module InsightsAPI
107
107
 
108
108
  def upload_into_insights(dataSourceName, recordType, batchDate, filePath)
109
109
  begin
110
+ temp_date = dateFormat(date: batchDate)
110
111
  response = HTTParty.post(
111
112
  "https://#{@url}/files/upload",
112
113
  :basic_auth => { :username => @api_token }, :body => {
113
114
  :dataSource => dataSourceName, :recordType => recordType,
114
- :batchDate => dateFormat(date: batchDate)})
115
+ :batchDate => temp_date})
115
116
  parsed = JSON.parse(response.body)
116
117
  signedUrl = parsed['signedUrl']
117
118
  if !File.extname(filePath) == ".gz"
@@ -124,9 +125,9 @@ module InsightsAPI
124
125
  post = HTTParty.put(signedUrl,
125
126
  :body => gzippedFile.read)
126
127
  if post.code == 200
127
- return {"status"=>"COMPLETE", "signedUrl"=>"signedUrl", "response" => post.code}
128
+ return {"status"=>"COMPLETE", "signedUrl"=>"#{signedUrl}", "response" => post.code, "batchDate" => "#{temp_date}"}
128
129
  else
129
- return {"status"=>"Error", "signedUrl"=>"signedUrl", "response" => post.code}
130
+ return {"status"=>"Error", "signedUrl"=>"#{signedUrl}", "response" => post.code, "message"=> "#{post.message}", "batchDate" => "#{temp_date}"}
130
131
  end
131
132
  rescue Exception => e
132
133
  Rails.logger.debug "[ZuoraGem]: While uploading to insights Error: #{e}"
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.4.03"
2
+ VERSION = "1.4.04"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.03
4
+ version: 1.4.04
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group