gotransverse-tract-api 0.23.0 → 0.24.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: 503edb0ff794886a9025f5be47926efb9bfe07c4
4
- data.tar.gz: 36bc18e1ed519d5221fbc7c51a257b14ecc2f23d
3
+ metadata.gz: 526b92f9f169f479906ba68d4fdb1d6ee06519e1
4
+ data.tar.gz: c9c1349efff578eaecd40b6695f03b1d28593f8d
5
5
  SHA512:
6
- metadata.gz: 671eb9419ab20138290f57a8f5ce8465ede95f07ff1ac6a88feae3dbaa0afe802042714bd20be2adcfcdaf44fa35817e5a7a458805bb0739f527479a15322802
7
- data.tar.gz: ca89d36f69a8021a20847118a7b42bf459a6a52814356606934ae69beef60a44cd10452f60a97273b51b60c825705651d746df0d0b9c9e1659a4ff461b814646
6
+ metadata.gz: cc7d3d3c51512f2672d693ec8042b31fca7f274f36ac89b401fdcd6d84d5f51efe345bb22e930c0a4229d9a65581f486313b6ccfb9be3147a5b91331395c13b9
7
+ data.tar.gz: bdfc7039fe203748f1afa057484d47a87e0a8333db3fec97a940f33d885b6678b635db117564a8c6019b5d425696881557ba44cc461034d96d4959e65844f618
@@ -49,6 +49,7 @@ require "gotransverse-tract-api/order/people"
49
49
  require "gotransverse-tract-api/order/product_relation"
50
50
  require "gotransverse-tract-api/order/renewal_order"
51
51
  require "gotransverse-tract-api/order/sales_order"
52
+ require "gotransverse-tract-api/order/order"
52
53
  require "gotransverse-tract-api/order/agreement_configuration"
53
54
  require "gotransverse-tract-api/order/discount_configuration"
54
55
  require "gotransverse-tract-api/order/inventory_item"
@@ -0,0 +1,48 @@
1
+ module GoTransverseTractApi
2
+
3
+ module Order
4
+
5
+ class Order < Common::OrderBase
6
+
7
+ class << self
8
+
9
+ #
10
+ # @param {Long} eid
11
+ # @param {Hash} sales_order
12
+ #
13
+ def add_custom_field_value_to_order(eid, sales_order, custom_field_eid=nil)
14
+ data =
15
+ {
16
+ addCustomFieldValueToOrder: {},
17
+ salesOrder: { eid: eid },
18
+ customFieldValue: { attributes: {value: sales_order[:value]} }
19
+ }
20
+
21
+ data[:customFieldValue][:customField] = { eid: custom_field_eid } if custom_field_eid
22
+
23
+ xml_data = GoTransverseTractApi.generateXML(data,'addCustomFieldValueToOrder')
24
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, xml_data, "addCustomFieldValue")
25
+ end
26
+
27
+ #
28
+ # @param {Long} eid
29
+ # @param {Hash} sales_order
30
+ #
31
+ def remove_custom_field_value_from_order eid, sales_order
32
+ data = {
33
+ removeCustomFieldValueFromOrder: {},
34
+ salesOrder: { eid: eid },
35
+ customFieldValue: { eid: sales_order[:custom_field_value_eid] }
36
+ }
37
+
38
+ xml_data = GoTransverseTractApi.generateXML(data,'removeCustomFieldValueFromOrder')
39
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, xml_data, "removeCustomFieldValue")
40
+ end
41
+
42
+ end
43
+
44
+ end
45
+
46
+ end
47
+
48
+ end
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.23.0"
3
+ VERSION = "0.24.0"
4
4
  TARGET_API_VERSION = "1.32"
5
5
 
6
6
  end
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.23.0
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien DeFrance
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-09-11 00:00:00.000000000 Z
12
+ date: 2017-12-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -157,6 +157,7 @@ files:
157
157
  - lib/gotransverse-tract-api/order/billing_account_category.rb
158
158
  - lib/gotransverse-tract-api/order/discount_configuration.rb
159
159
  - lib/gotransverse-tract-api/order/inventory_item.rb
160
+ - lib/gotransverse-tract-api/order/order.rb
160
161
  - lib/gotransverse-tract-api/order/order_item.rb
161
162
  - lib/gotransverse-tract-api/order/order_item_charge.rb
162
163
  - lib/gotransverse-tract-api/order/organization.rb