gotransverse-tract-api 0.21.1 → 0.22.0

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
  SHA1:
3
- metadata.gz: b529ad9ee3de1bbd2bd22bdef8af154625a093cb
4
- data.tar.gz: 996716cd0cef8114d3f88ea16259f4cb2cb4448c
3
+ metadata.gz: 89a85ab4f5b2a4406596beb113ef61b080bf691c
4
+ data.tar.gz: 1ffd5d5e76dfd25c6e91ca7e6381160d2769e4ac
5
5
  SHA512:
6
- metadata.gz: 2b0da51e7327a5113bfeb066e7e2c75faafdc96fc65932759bbaf7597335f06b8213a76ba49d4e3d6253d5693992012ecb7708844950db59d7b1896707b9dd86
7
- data.tar.gz: 1f044f2d30b4ec006500c10275d31e40eb12d02b83e1c1cf077defc0a6efd7740ef9fd36d47b0f411debf746e023608a566711cbe130c42b4f1df8b4d253aa3f
6
+ metadata.gz: c7861810abe23aae9f6e88b536a9312545a3ecc9496853f0ad06648f8bd500e9de567c82fe62b3dc5ed42a41c5437a41eb974848292e3f90092b6a574066589b
7
+ data.tar.gz: a94b6fa52e51f274fdcf88923983693094a6e2e5ec4db939cb67f2ede992773d66317d38e503b00ccd7b447d738d3b33211132a7032a42b188fd972028f2498c
@@ -64,6 +64,7 @@ require "gotransverse-tract-api/product/billing_account_segment"
64
64
  require "gotransverse-tract-api/product/billing_account_segment_field"
65
65
  require "gotransverse-tract-api/product/operation"
66
66
  require "gotransverse-tract-api/product/operation_attribute"
67
+ require "gotransverse-tract-api/product/product_sale_operation_attributes"
67
68
  require "gotransverse-tract-api/product/price_list"
68
69
  require "gotransverse-tract-api/product/product_price_range"
69
70
  require "gotransverse-tract-api/product/product"
@@ -0,0 +1,48 @@
1
+ module GoTransverseTractApi
2
+
3
+ module Product
4
+
5
+ class ProductSaleOperationAttributes
6
+
7
+ #
8
+ # @param {Long} eid
9
+ # @param {Hash} options
10
+ #
11
+ def self.find_by_eid(eid, options={})
12
+ return nil unless eid.present?
13
+
14
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
15
+ GoTransverseTractApi.get_response_for(self, params)
16
+ end
17
+
18
+ #
19
+ # @param {Long} product_order_item_eid
20
+ # @param {Hash} options
21
+ #
22
+ def self.find_by_product_order_item_eid(product_order_item_eid, options={})
23
+ return nil unless product_order_item_eid.present?
24
+
25
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({product_order_item_eid: product_order_item_eid}, options)
26
+ GoTransverseTractApi.get_response_for(self, params)
27
+ end
28
+
29
+ #
30
+ # @param {Long} eid
31
+ # @param {Hash} product_sale_operation_attribute
32
+ #
33
+ def self.update(eid, product_sale_operation_attribute)
34
+ data = {
35
+ productSaleOperationAttribute: {
36
+ autoApproveDate: product_sale_operation_attribute[:product_sale_operation_attribute][:auto_approve_date],
37
+ eid: eid
38
+ },
39
+ approvalOperation: {attributes: {eid: product_sale_operation_attribute[:approval_operation][:eid]}}
40
+ }
41
+
42
+ xml_data = GoTransverseTractApi.generateXML(data, 'productSaleOperationAttribute')
43
+ GoTransverseTractApi.put_request_for(self, {eid: eid}, xml_data)
44
+ end
45
+
46
+ end
47
+ end
48
+ end
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.21.1"
4
- TARGET_API_VERSION = "1.29"
3
+ VERSION = "0.22.0"
4
+ TARGET_API_VERSION = "1.31"
5
5
 
6
6
  end
@@ -74,7 +74,7 @@ RSpec.describe GoTransverseTractApi do
74
74
 
75
75
  context ".generateXML" do
76
76
  it "generates XML for the given hash object" do
77
- response = "<root xmlns='http://www.tractbilling.com/billing/1_29/domain'>\n <element1 x='y' y='z'/>\n <element2 a='b'>\n <children c='d' e='f'/>\n </element2>\n</root>"
77
+ response = "<root xmlns='http://www.tractbilling.com/billing/1_31/domain'>\n <element1 x='y' y='z'/>\n <element2 a='b'>\n <children c='d' e='f'/>\n </element2>\n</root>"
78
78
 
79
79
  h = {
80
80
  root: {},
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gotransverse-tract-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.1
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien DeFrance
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-22 00:00:00.000000000 Z
13
+ date: 2016-12-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -184,6 +184,7 @@ files:
184
184
  - lib/gotransverse-tract-api/product/product_category.rb
185
185
  - lib/gotransverse-tract-api/product/product_price.rb
186
186
  - lib/gotransverse-tract-api/product/product_price_range.rb
187
+ - lib/gotransverse-tract-api/product/product_sale_operation_attributes.rb
187
188
  - lib/gotransverse-tract-api/product/product_tag.rb
188
189
  - lib/gotransverse-tract-api/product/recurring_product_price.rb
189
190
  - lib/gotransverse-tract-api/service/service.rb
@@ -260,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
261
  version: '0'
261
262
  requirements: []
262
263
  rubyforge_project:
263
- rubygems_version: 2.4.8
264
+ rubygems_version: 2.4.5.1
264
265
  signing_key:
265
266
  specification_version: 4
266
267
  summary: A ruby gem allowing developers to conveniently integrate with GoTransverse's