zuora_api 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +80 -47
  3. data/lib/zuora_api/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06acc4388d35fd8e541a3e64553abf53dc0baa1b
4
- data.tar.gz: 1f6c0ec93f0d3ef96084b21bbe0d0291cf20dbcd
3
+ metadata.gz: da5db0ec1e91e2e8340fda90b2501b3a372072a8
4
+ data.tar.gz: a3acb011a6fe0c8e052073386a56fd290ce083f4
5
5
  SHA512:
6
- metadata.gz: 89fa954b4ea4b7d50d43d159dcfdf28a240dc4d3f46dfce178fbbdf1df20b4fcbf53f37a082d20d7f6499c37511c8b66184dc8961c82fa07f57fdf7bb9f01ff0
7
- data.tar.gz: 21d8f556e2afc22be9d756218a3587f95c01c8e7ed4d199fd2afdb4acf892e379c201a0fac52f826e90667b5c3f2911f04b703246adf15a4367d4723a1011c63
6
+ metadata.gz: 89e20679064b9347192b8da482912ad1e3a6b95e9239551b0ab209dfcb2ac4d5d4ce5592f5d5afd3ae5984fcbde7d43c6704ada9e19327e11e07c4552d19b442
7
+ data.tar.gz: 3ce640049b0c18e362e74028378a6c6d882b9c98df4ec055a407a1a0049636f191e414c9eab0f2fec6f4cc9f5866135f13f5f749fb1eb840b71a830b9a0f84ee
data/README.md CHANGED
@@ -1,74 +1,107 @@
1
- # Zuora_api
1
+ # Zuora Gem
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/zuora_api.svg)](https://badge.fury.io/rb/zuora_api)
4
4
 
5
- This gem provides an easy integration with Zuora
6
-
7
5
  ## Installation
8
-
9
6
  Add this line to your application's Gemfile:
7
+
10
8
  ```ruby
11
9
  gem 'zuora_api'
12
10
  ```
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install zuora
11
+ Then execute `bundle install` in your terminal
20
12
 
21
13
  ## Usage
22
14
 
23
- In order to make API calls a Zuora Login object must be created by running
24
-
25
- zuora_client = Zuora:API:Login.new(:username =>"username", :password => "password", :url => "endpoint")
15
+ ### Zuora Login Object
16
+ In order to make API calls a Zuora Login object must be created
26
17
 
27
- ### Available Fields
28
- - username
29
- - password
30
- - url
31
- - wsdl_number
32
- - status
33
- - current_session
34
- - environment
35
- - status
36
- - errors
37
- - current_error
38
- - user_info
39
- - tenant_id
40
- - tenant_name
18
+ ```ruby
19
+ zuora_client = Zuora::Login.new("username", "password", "endpoint")
20
+ ```
41
21
 
42
- ### Rest Call
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 `|xml, args|` 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
+ ```
43
56
 
44
- zuora_client.rest_call(method: :get, body: {}, url: rest_endpoint("catalog/products?pageSize=4"),headers: {}, **keyword_args)
57
+ ### Soap Call
58
+ Returns both output and input XML
45
59
 
46
- ### SOAP Call
60
+ ```ruby
61
+ zuora_client.soap_call(ns1: 'ns1', ns2: 'ns2', batch_size: nil, single_transaction: false)
62
+ ```
47
63
 
48
- soap_call(ns1: 'ns1', ns2: 'ns2', batch_size: nil, single_transaction: false, debug: false , **keyword_args)
49
- Example:
64
+ Example Call
50
65
 
51
- output_xml, input_xml = zuora_client.soap_call() do |xml, args|
52
- xml['ns1'].query do
53
- xml['ns1'].queryString "select id, name from account"
54
- end
55
- end
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
+ ```
56
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
57
79
 
58
- zuora_client.query(query)
59
-
60
- ### Data export
80
+ ```ruby
81
+ zuora_client.getDataSourceExport("select id from account")
82
+ ```
61
83
 
62
- zuora_client.getDataSourceExport(query)
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)` |
63
90
 
64
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.
65
93
 
66
- response = zuora_client.describe_call()
67
- 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.
68
-
69
- response = zuora_client.describe_call("Account")
94
+ ```ruby
95
+ response = zuora_client.describe_call("Account")
96
+ ```
70
97
  This returns all information and fields related to that object model as a hash.
71
98
 
99
+ ```ruby
100
+ response = zuora_client.describe_call()
101
+ ```
102
+
72
103
  ### Journal Run
73
104
 
74
- zuora_client.createJournalRun(call)
105
+ ```ruby
106
+ zuora_client.createJournalRun(call)
107
+ ```
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
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.2.0
4
+ version: 1.2.1
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: 2017-04-12 00:00:00.000000000 Z
11
+ date: 2017-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler