erp_integration 1.0.0 → 1.0.1

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: 2cd27cee73fe0ca1c7df7893b35f52f3cdf54f9ae32a4559c739cc804d80bd4a
4
- data.tar.gz: 5194f43286bf53cd04ea22b01d261268c32749b0b9dc8d5db24cc778d6b1ae70
3
+ metadata.gz: ad3730a4402988984abd10fe810f4865cfee54f4dbc432bfbd43aaf8417153ec
4
+ data.tar.gz: 1735fdccbea6c4b29ab44f01d8a07965f0acf0c5d4c30ae55a5a082b8fd2df1d
5
5
  SHA512:
6
- metadata.gz: 10885ee89ef3960ba1d192ff6b5c32f51193b235d5c10d10831af1dc28b6583e65547a69d1db2c2738fe22ba94bcf72ff2bbccabdcbed9b27ab38fee6a14565c
7
- data.tar.gz: 783e67561264e6734caeca1bffc8ab67f758c09675ec261ed0f6238bf1c13bf523356f6d114c6f56c6d9869f5625b5975f1e6c6e2bba06217139d0ccb9e50b9b
6
+ metadata.gz: 4cb38e50117fe3ac7ce1da2a3bcddd7446d34aa51b75401bf9f188fab95a7f641a4cc308420bdbd018501633683c4fc96ebb258feb037cda7e3bd6b3315f5b46
7
+ data.tar.gz: 314fab0d17387b28df68fc5686c54902d5a73e6b646e460abaadfcca940fb719ffc013af602064f5923c15ab37604612d45e81ad39b7cf966d64cb06ad87b4eb
@@ -7,6 +7,21 @@ module ErpIntegration
7
7
  module Resources
8
8
  class PurchaseOrder < ApiResource
9
9
  self.model_name = 'purchase.purchase'
10
+
11
+ # Creates a Purchase Order with options.
12
+ #
13
+ # @param options [Hash] The options attributes
14
+ def create_with_options(options)
15
+ client.post("model/#{model_name}", options)
16
+ end
17
+
18
+ # Updates a Purchase Order with options.
19
+ #
20
+ # @param id [Integer, String] The ID of the Purchase Order
21
+ # @param options [Hash] The options attributes
22
+ def update_with_options(id, options)
23
+ client.put("model/#{model_name}/#{id}", options)
24
+ end
10
25
  end
11
26
  end
12
27
  end
@@ -11,5 +11,13 @@ module ErpIntegration
11
11
  :purchase_person, :reference, :shipment_method, :shipments, :state,
12
12
  :tax_amount, :total_amount, :total_quantity, :untaxed_amount, :write_date,
13
13
  :write_uid
14
+
15
+ def create_with_options(options)
16
+ self.class.adapter.create_with_options(options)
17
+ end
18
+
19
+ def update_with_options(options)
20
+ self.class.adapter.update_with_options(id, options)
21
+ end
14
22
  end
15
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ErpIntegration
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erp_integration
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Vermaas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-10 00:00:00.000000000 Z
11
+ date: 2025-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport