zuora_api 1.8.22 → 1.8.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5546a62ebcd1e41ab71c6e8555c49a9c8de4e627b69c2d6c3ee658e32a773a81
4
- data.tar.gz: 75c008dec5f8652cfcdcd86d3e0503ddab0d6fe26789bd17a8b87551fdce7b3f
3
+ metadata.gz: e0ab2609485e4d653738cdd84169feac4058531f4caac36e62b88fd8910008cc
4
+ data.tar.gz: d86b6df5e09c4eed423b362e0334f5605da724e6a7956bd6c896aeccbc9e3fa5
5
5
  SHA512:
6
- metadata.gz: e8ee6cc80db3980eff77b60f94d8ce97a08fdabc5ed013a927c1ae8e8f40bc76fbaabcd95fae270dba1e7c813127aa526791e146d4838a610c29c4b56bc4e154
7
- data.tar.gz: dc8cfcca12a83c6c0103e908c77b9f6838f9cb426a7762cd34998015e8f94d35ae756691b42527780204a65a22cea47502f057df48028551a5395271e7300c7a
6
+ metadata.gz: 42c8e4f181cb4c64275db13bb0104d47864cd80e3b53a930fd48373b4fa43aa4022bc21162f38fe53dcadeca06ea601e0d7dd25161a5a57678c3008b1239b046
7
+ data.tar.gz: 8f06a60bc4263a8529dbb5c6a862668cce4f1bda5b5f33f6df25f67bb49f79c7382cc2192d486a4c09802590e990041ad7a8fa627cd5e88975c9636c6e716eb1
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2021 Zuora, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -145,3 +145,13 @@ Both do the same thing except one returns a url(data_export_insights) to downloa
145
145
  objectype: "ACCOUNT/USER"
146
146
 
147
147
  segmentuuid: A single or array of string or int of a segment uuid(s) that you get from the describe call. The csv holds a column with a bool that represents if that User or Account belongs to that segment.
148
+
149
+ ### License Information
150
+ IN THE EVENT YOU ARE AN EXISTING ZUORA CUSTOMER, USE OF THIS SOFTWARE IS GOVERNED
BY THE MIT LICENSE SET FORTH BELOW AND NOT THE MASTER SUBSCRIPTION AGREEMENT OR OTHER COMMERCIAL AGREEMENT ENTERED INTO BETWEEN YOU AND ZUORA (“AGREEMENT”). FOR THE AVOIDANCE OF DOUBT, ZUORA’S OBLIGATIONS WITH RESPECT TO TECHNICAL SUPPORT, UPTIME, INDEMNIFICATION, AND SECURITY SET FORTH IN THE AGREEMENT DO NOT APPLY TO THE USE OF THIS SOFTWARE.
151
+
152
+ Copyright 2021 Zuora, Inc.
153
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
154
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
155
+
156
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
157
+
@@ -238,7 +238,7 @@ module ZuoraAPI
238
238
  end
239
239
  end
240
240
 
241
- class ZuoraAPIReadTimeout < Net::ReadTimeout
241
+ class ZuoraAPIReadTimeout < Timeout::Error
242
242
  attr_reader :code, :response, :request
243
243
  attr_writer :default_message
244
244
 
@@ -21,7 +21,7 @@ module ZuoraAPI
21
21
  ].freeze
22
22
 
23
23
  CONNECTION_READ_EXCEPTIONS = [
24
- Net::ReadTimeout,
24
+ Timeout::Error,
25
25
  Errno::ECONNRESET,
26
26
  Errno::EPIPE
27
27
  ].freeze
@@ -519,7 +519,7 @@ module ZuoraAPI
519
519
  end
520
520
 
521
521
  self.log(location: "SOAP Call", exception: ex, message: "Timed out", level: :error) if output_exception_messages
522
- ex = ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from 'https://#{rest_domain(endpoint: url)}'", nil, request) if ex.instance_of?(Net::ReadTimeout)
522
+ ex = ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read/write timeout from 'https://#{rest_domain(endpoint: url)}'", nil, request) if ex.is_a?(Timeout::Error) && !ex.instance_of?(ZuoraAPI::Exceptions::ZuoraAPIReadTimeout)
523
523
  raise ex
524
524
 
525
525
  rescue => ex
@@ -1203,7 +1203,7 @@ module ZuoraAPI
1203
1203
  end
1204
1204
 
1205
1205
  self.log(location: "Rest Call", exception: ex, message: "Timed out", level: :error) if output_exception_messages
1206
- ex = ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from 'https://#{rest_domain(endpoint: url)}'", nil, request) if ex.instance_of?(Net::ReadTimeout)
1206
+ ex = ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read/write timeout from 'https://#{rest_domain(endpoint: url)}'", nil, request) if ex.is_a?(Timeout::Error) && !ex.instance_of?(ZuoraAPI::Exceptions::ZuoraAPIReadTimeout)
1207
1207
  raise ex
1208
1208
 
1209
1209
  rescue => ex
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.8.22"
2
+ VERSION = "1.8.23"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.22
4
+ version: 1.8.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-22 00:00:00.000000000 Z
11
+ date: 2021-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -163,23 +163,9 @@ executables: []
163
163
  extensions: []
164
164
  extra_rdoc_files: []
165
165
  files:
166
- - ".gitignore"
167
- - ".gitlab-ci.yml"
168
- - ".rspec"
169
- - ".travis.yml"
170
- - CHANGELOG.md
171
- - Gemfile
172
- - Gemfile.lock
166
+ - MIT-LICENSE
173
167
  - README.md
174
168
  - Rakefile
175
- - bin/console
176
- - bin/setup
177
- - catalog-info.yaml
178
- - docs/index.md
179
- - gemfiles/Gemfile-rails.5.0.x
180
- - gemfiles/Gemfile-rails.5.1.x
181
- - gemfiles/Gemfile-rails.5.2.x
182
- - gemfiles/Gemfile-rails.6.0.x
183
169
  - lib/insights_api/login.rb
184
170
  - lib/zuora_api.rb
185
171
  - lib/zuora_api/exceptions.rb
@@ -187,7 +173,6 @@ files:
187
173
  - lib/zuora_api/logins/basic.rb
188
174
  - lib/zuora_api/logins/oauth.rb
189
175
  - lib/zuora_api/version.rb
190
- - zuora_api.gemspec
191
176
  homepage: https://connect.zuora.com
192
177
  licenses: []
193
178
  metadata: {}
data/.gitignore DELETED
@@ -1,11 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- .idea
11
- .DS_Store
data/.gitlab-ci.yml DELETED
@@ -1,63 +0,0 @@
1
- image: ruby:2.7
2
- stages:
3
- - test
4
- - deploy
5
-
6
- rubocop-testing:
7
- stage: test
8
- allow_failure: true
9
- script:
10
- - gem install rubocop
11
- - rubocop --lint
12
-
13
- security-testing:
14
- stage: test
15
- allow_failure: true
16
- script:
17
- - gem install brakeman
18
- - brakeman
19
-
20
- ruby:test:
21
- stage: test
22
- cache:
23
- key: ruby:$RUBY_VERSION-rails:$RAILS_VERSION
24
- paths:
25
- - vendor/ruby
26
- parallel:
27
- matrix:
28
- - RUBY_VERSION: "2.7"
29
- RAILS_VERSION: ["5.0", "5.1", "5.2", "6.0"]
30
- before_script:
31
- - bundle config set path 'vendor/ruby'
32
- - bundle config --global gemfile "gemfiles/Gemfile-rails.$RAILS_VERSION.x"
33
- - bundle install
34
- script:
35
- - bundle exec rails -v
36
- - bundle exec rspec
37
- coverage: '/\(\d+.\d+\%\) covered/'
38
-
39
- rubygems-deploy:
40
- stage: deploy
41
- allow_failure: false
42
- script:
43
- - echo "deb http://ftp.us.debian.org/debian testing main contrib non-free" >> /etc/apt/sources.list
44
- - apt-get update
45
- - apt-get install -y git
46
- - apt-get clean all
47
- - gem install dpl
48
- - if [[ "staging" == $CI_BUILD_REF_SLUG ]];then export VERSION=`git describe --match "[0-9]*\.[0-9]*\.[0-9]*[a-z]" --abbrev=0 --tags HEAD`; fi
49
- - if [[ "master" == $CI_BUILD_REF_SLUG ]];then export VERSION=`git describe --exclude "[0-9]*\.[0-9]*\.[0-9]*[a-z]" --abbrev=0 --tags HEAD`; fi
50
- - echo $VERSION
51
- - sed -i "s/0.0.1/$VERSION/" lib/zuora_api/version.rb
52
- - git add lib/zuora_api/version.rb
53
- - git config --global user.email "connect@zuora.com"
54
- - git config --global user.name "Connect Automation"
55
- - git commit -m "Automated Version Update $VERSION"
56
- - bundle install
57
- - gem install rake
58
- - version=$(rake install | grep -o 'pkg/zuora_api-.*gem')
59
- - curl -u $USERNAME:$PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
60
- - gem push $version
61
- only:
62
- - master
63
- - staging
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.0
5
- before_install: gem install bundler -v 1.12.5
data/CHANGELOG.md DELETED
@@ -1,105 +0,0 @@
1
- # Changelog
2
- All notable changes to this project will be documented in this file.
3
-
4
- ## [1.7.07] - 2018-9-10
5
- ### Changed
6
- - Cookie name for service endpoint integration
7
-
8
- ## [1.7.06] - 2018-8-25
9
- ### Added
10
- - Retry for 502/503
11
- - Standard exception for 504
12
-
13
- ## [1.7.05] - 2018-8-25
14
- ### Added
15
- - Added support for oauth token forbidden
16
-
17
- ## [1.7.02] - 2018-8-23
18
- ### Added
19
- - Added mulit part support for rest call
20
-
21
- ## [1.7.01] - 2018-8-06
22
- ### Changed
23
- - Changed library used to determine host
24
- - Added retry for 504 timouts in file download
25
-
26
- ## [1.7.00] - 2018-8-05
27
- ### Changed
28
- - Raise proper exception when oauth client is from deactivated user.
29
- - Support for rails < 6
30
-
31
- ## [1.6.53] - 2018-7-29
32
- ### Changed
33
- - Don't attempt zsession login if bearer token is bad
34
-
35
- ## [1.6.51 - 1.6.51] - 2018-7-22
36
- ### Changed
37
- - Retry on address not available.
38
-
39
- ## [1.6.47 - 1.6.48] - 2018-6-26
40
- ### Changed
41
- - Changed error raise statements when incorrect credentials are supplied to Basic/Oauth Logins
42
-
43
- ## [1.6.45] - 2018-5-30
44
- ### Changed
45
- - Fix retry so headers are reinstaniated on session failure.
46
-
47
- ## [1.6.41] - 2018-5-30
48
- ### Changed
49
- - Retry added on SSL connection failure
50
-
51
- ## [1.6.39-1.6.40] - 2018-5-30
52
- ### Changed
53
- - Added validation to fix bad urls entered into object initialization
54
-
55
- ## [1.6.38] - 2018-5-26
56
- ### Changed
57
- - HttpParty validation before code extraction
58
-
59
- ## [1.6.37] - 2018-5-23
60
- ### Added
61
- - Added method to determine rest endpoint domain
62
-
63
- ## [1.6.36] - 2018-5-22
64
- ### Changed
65
- - Fixed zuora staging 2 endpoint
66
-
67
- ## [1.6.33] - 2018-5-15
68
- ### Changed
69
- - Added Errno::EHOSTUNREACH to list of retriable error codes
70
-
71
- ## [1.6.32] - 2018-5-14
72
- ### Changed
73
- - Don't log fatal errors, allow application to decide for file download
74
- - Don't change api url if the user set a high api url
75
-
76
- ###Removed
77
- - Force encoding
78
-
79
- ## [1.6.28] - 2018-3-12
80
- ### Added
81
- - Way to avoid force encoding for filedownload
82
-
83
- ## [1.6.28] - 2018-3-12
84
- ### Added
85
- - Way to avoid force encoding for filedownload
86
-
87
- ## [1.6.22] - 2019-01-03
88
- ### Changed
89
- - get_identity method - supports ZSession auth now
90
- - updated rspecs accordingly
91
-
92
- ## [1.6.18] - 2018-12-06
93
- ### Added
94
- - zconnect_provider attribute accessor for identifying ZConnect cookies
95
- - Methods for Hallway integration:
96
- - get_identity
97
- - get_full_nav
98
- - set_nav
99
- - refresh_nav
100
- - get_oauth_client
101
-
102
- ### Changed
103
- - The way environment and region are set
104
-
105
-
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
- ruby "2.7.2"
3
- # Specify your gem's dependencies in zuora.gemspec
4
- gemspec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "zuora"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/catalog-info.yaml DELETED
@@ -1,12 +0,0 @@
1
- ---
2
- apiVersion: backstage.io/v1alpha1
3
- kind: Component
4
- metadata:
5
- annotations:
6
- backstage.io/techdocs-ref: "gitlab:https://gitlab.zeta.tools/extension-products/shared-libraries/zuora-gem.git"
7
- description: "Zuora API Rails Gem"
8
- name: Zuora-Gem
9
- spec:
10
- lifecycle: production
11
- owner: connect@zuora.com
12
- type: library
data/docs/index.md DELETED
@@ -1,147 +0,0 @@
1
- # Zuora Gem
2
-
3
- [![Gem Version](https://badge.fury.io/rb/zuora_api.svg)](https://badge.fury.io/rb/zuora_api) [![coverage report](https://gitlab.0.ecc.auw2.zuora/extension-products/shared-libraries/zuora-gem/badges/master/coverage.svg)](https://gitlab.0.ecc.auw2.zuora/extension-products/shared-libraries/zuora-gem/commits/master)
4
-
5
- ## Installation
6
- Add this line to your application's Gemfile:
7
-
8
- ```ruby
9
- gem 'zuora_api'
10
- ```
11
- Then execute `bundle install` in your terminal
12
-
13
- ## Usage
14
-
15
- ### Zuora Login Object
16
- In order to make API calls a Zuora Login object must be created
17
-
18
- ```ruby
19
- zuora_client = ZuoraAPI::Login.new(username: "username", password: "password", url: "url")
20
- ```
21
-
22
- | Name | Type | Description | Example |
23
- | ------------------- | ----------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
24
- | username | `Attribute` | Username to the Zuora environment | `zuora_client.username = "username"` |
25
- | password | `Attribute` | password to the Zuora environment | `zuora_client.password = "Password"` |
26
- | url | `Attribute` | Endpoint to the Zuora tenant | `zuora_client.url = "www.zuora.com"` |
27
- | wsdl_number | `Attribute` | WSDL number of the zuora login | `wsdl = zuora_client.wsdl_number` |
28
- | status | `Attribute` | Status of the login | `zuora_client.status` |
29
- | current_session | `Attribute` | Current session for the login | `zuora_client.current_session` |
30
- | environment | `Attribute` | environment of the login | `zuora_client.environment` |
31
- | errors | `Attribute` | Any errors that the login has based on the login call | `zuora_client.errors` |
32
- | current_error | `Attribute` | Current error from the new_session call | `zuora_client.current_error` |
33
- | user_info | `Attribute` | Information related to the login | `zuora_client.user_info` |
34
- | tenant_id | `Attribute` | Tenant ID the login is associated to | `zuora_client.tenant_id` |
35
- | tenant_name | `Attribute` | Tenant Name of tenant the login is associated to | `zuora_client.tenant_name` |
36
- | entity_id | `Attribute` | Current entity the login session is associated to | `zuora_client.entity_id` |
37
- | rest_call | `Method` | Executes a REST call | `zuora_client.rest_call()` |
38
- | soap_call | `Method` | Executes a SOAP call | `output_xml, input_xml = zuora_client.soap_call() do `&#124;xml, args&#124;` xml['ns1'].query do xml['ns1'].queryString "select id, name from account" end end` |
39
- | query | `Method` | Executes a query call | `zuora_client.query("select id, name from account")` |
40
- | getDataSourceExport | `Method` | Pulls a data source export with the given query and returns the file location | `zuora_client.getDataSourceExport("select id, name from account")` |
41
- | describe_call | `Method` | Performs the describe call against the Zuora tenant for all objects or a specific object | `response = zuora_client.describe_call("Account")` |
42
- | createJournalRun | `Method` | Creates a Journal Run | `zuora_client.createJournalRun(call)` |
43
- | checkJRStatus | `Method` | Checks the status of a journal run | `zuora_client.checkJRStatus(journal_run_id)` |
44
- | update_environment | `Method` | Sets the login's environment based on the url | `zuora_client.update_environment` |
45
- | aqua_endpoint | `Method` | Returns the AQuA endpoint for the login based off the environment | `zuora_client.aqua_endpoint` |
46
- | rest_endpoint | `Method` | Returns the REST endpoint for the login based off the environment | `zuora_client.rest_endpoint` |
47
- | fileURL | `Method` | Returns the URL for files | `zuora_client.fileURL` |
48
- | dateFormat | `Method` | Returns the data format syntax based on the wsdl_number | `zuora_client.dateFormat` |
49
- | new_session | `Method` | Create a new session | `zuora_client.new_session` |
50
- | get_session | `Method` | Returns the current session | `zuora_client.get_session`|
51
-
52
- ## Rest Call
53
- ```ruby
54
- zuora_client.rest_call(method: :get, body: {}, url: zuora_client.rest_endpoint("catalog/products?pageSize=4"))
55
- ```
56
-
57
- ### Soap Call
58
- Returns both output and input XML
59
-
60
- ```ruby
61
- zuora_client.soap_call(ns1: 'ns1', ns2: 'ns2', batch_size: nil, single_transaction: false)
62
- ```
63
-
64
- Example Call
65
-
66
- ```ruby
67
- output_xml, input_xml = zuora_client.soap_call() do |xml, args|
68
- xml['ns1'].query do
69
- xml['ns1'].queryString "select id, name from account"
70
- end
71
- end
72
- ```
73
- ### Query
74
- ```ruby
75
- zuora_client.query("select id from account")
76
- ```
77
- ### Data Export
78
- Returns the file location of the data source export after downloading from Zuora
79
-
80
- ```ruby
81
- zuora_client.getDataSourceExport("select id from account")
82
- ```
83
-
84
- | Name | Description | Default | Example |
85
- | --------- | ---------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------- |
86
- | query | The query to execute | `N/A` | `zuora_client.getDataSourceExport("select id from account")` |
87
- | zip | Indicates if the data source export should be a zip | `true` | `zuora_client.getDataSourceExport("select id from account", zip: false)` |
88
- | extract | Indicates if the data source export should be extracted if it is a zip | `true` | `zuora_client.getDataSourceExport("select id from account", extract: false)` |
89
- | encrypted | Indicates if the data source export should be encrypted | `false` | `zuora_client.getDataSourceExport("select id from account", encrypted: true)` |
90
-
91
- ### Describe Call
92
- This returns all available objects from the describe call as a hash. This response can be accessed by using response["Account"] to retrieve all related data about that object.
93
-
94
- ```ruby
95
- response = zuora_client.describe_call("Account")
96
- ```
97
- This returns all information and fields related to that object model as a hash.
98
-
99
- ```ruby
100
- response = zuora_client.describe_call()
101
- ```
102
-
103
- ### Journal Run
104
- ```ruby
105
- zuora_client.createJournalRun(call)
106
- ```
107
-
108
- ## Insights API
109
-
110
- In order to make API calls a Zuora Login object must be created by running:
111
-
112
- ```ruby
113
- insightsapi = InsightsAPI::Login.new(api_token: "api token", url: "Nw1.api.insights.zuora.com/api/")
114
- ```
115
-
116
- Note that the login will default to the insights production url.
117
-
118
- ```ruby
119
- Date format: "YYYY-MM-DDT00:00:00Z"
120
- ```
121
-
122
- ### Uploading Data into Insights
123
- ```ruby
124
- insightsapi.upload_into_insights(dataSourceName, recordType, batchDate, filePath)
125
- ```
126
- dataSourceName: What system the data is coming from.
127
- recordType: The type of records ie: "EVENTS, ATTRIBUTES, and METRICS"
128
- batachDate: The date the data applies to.
129
-
130
- ### Describing Insights Data
131
- ```ruby
132
- insightsapi.describe(type: "ACCOUNT/USER", object: "ATTRIBUTES/EVENTS/SEGMENTS/METRICS")
133
- ```
134
- Returns json payload describing attributes, events, metrics for each Account or User.
135
-
136
- ### Downloading Data from Insights
137
- ```ruby
138
- insightsapi.data_export_insights(objecttype, segmentuuid, startDate: nil, endDate: nil, tries: 30)
139
- ```
140
- ```ruby
141
- insightsapi.data_export_insights_file(objecttype, segmentuuid, startDate: nil, endDate: nil, tries: 30)
142
- ```
143
- Both do the same thing except one returns a url(data_export_insights) to download the file yourself and the other returns an actual Ruby temporary file(data_export_insights_file).
144
-
145
- objectype: "ACCOUNT/USER"
146
-
147
- segmentuuid: A single or array of string or int of a segment uuid(s) that you get from the describe call. The csv holds a column with a bool that represents if that User or Account belongs to that segment.
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: "../"
4
-
5
- gem "rails", "~> 5.0.0"
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: "../"
4
-
5
- gem "rails", "~> 5.1.0"
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: "../"
4
-
5
- gem "rails", "~> 5.2.0"
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: "../"
4
-
5
- gem "rails", "~> 6.0.0"
data/zuora_api.gemspec DELETED
@@ -1,31 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'zuora_api/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "zuora_api"
8
- spec.version = ZuoraAPI::VERSION
9
- spec.authors = ["Zuora Strategic Solutions Group"]
10
- spec.email = ["connect@zuora.com"]
11
-
12
- spec.summary = %q{Gem that provides easy integration to Zuora}
13
- spec.description = %q{Gem that provides easy integration to Zuora}
14
- spec.homepage = "https://connect.zuora.com"
15
-
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = "exe"
18
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler"
22
- spec.add_development_dependency "rake", "~> 10.0"
23
- spec.add_development_dependency "rspec", "~> 3.0"
24
- spec.add_development_dependency("webmock")
25
- spec.add_development_dependency("simplecov", "~> 0.18.5")
26
- spec.add_dependency("ougai")
27
- spec.add_dependency("nokogiri")
28
- spec.add_dependency("httparty")
29
- spec.add_dependency("rubyzip")
30
- spec.add_dependency 'railties', '>= 4.1.0', '< 6.1'
31
- end