acasi_api 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/acasi_api.rb +42 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 01f7b86dbe1b13a3b59d412f97b89f6c1a8831992ac88e50c22e3b44fa5f4407
4
+ data.tar.gz: fec43a4e456bee31228dba98b28d2ac0eedd03910bcb95785b5e07c329291bbe
5
+ SHA512:
6
+ metadata.gz: 5bdc744de9e8b858f871269c930b2e02b903c6afc64de711151c9e4658e9405ea41c4e0dd74116081a1e42596cf74eb3feea98b0a071c7cda43f412d9b810529
7
+ data.tar.gz: 6214efac0ebe9db1c8642e6c7b4c4cab722360e63a0fe234fde89b9e61ae7c1e717afb202d3e4cad028e3598d830fa241f93bf2fec61f355597e3cc31ba5889f
data/lib/acasi_api.rb ADDED
@@ -0,0 +1,42 @@
1
+ module Acasi
2
+ attr_accessor :api_url
3
+ attr_accessor :api_key
4
+
5
+ class WhoIs
6
+ def self.awesome?
7
+ puts "ACASI IS AWESOME V 0.0.4!!"
8
+ end
9
+ end
10
+
11
+ class ItemCategories
12
+ def self.all
13
+ JSON.parse(RestClient::Request.execute(
14
+ method: :get,
15
+ url: "#{Acasi.api_url}/item_categories",
16
+ headers: {params: {api_token: Acasi.api_key}}
17
+ ).body)
18
+ end
19
+ end
20
+
21
+ class BankTransactions
22
+ def self.default_category(bank_transaction_id)
23
+ JSON.parse(RestClient::Request.execute(
24
+ method: :get,
25
+ url: "#{Acasi.api_url}/bank_transactions/default_category",
26
+ headers: {params: {api_token: Acasi.api_key, bank_transaction_id: bank_transaction_id}}
27
+ ).body)
28
+ end
29
+ end
30
+
31
+ class PurchaseInvoices
32
+ def self.default_category(purchase_invoice_id)
33
+ JSON.parse(RestClient::Request.execute(
34
+ method: :get,
35
+ url: "#{Acasi.api_url}/purchase_invoices/default_category",
36
+ headers: {params: {api_token: Acasi.api_key, purchase_invoice_id: purchase_invoice_id}}
37
+ ).body)
38
+ end
39
+ end
40
+
41
+ end
42
+
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: acasi_api
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Sebastien Milou
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-07-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Access API Acasi
14
+ email: sebastien.milou@acasi.io
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/acasi_api.rb
20
+ homepage: https://rubygems.org/gems/acasi_api
21
+ licenses:
22
+ - MIT
23
+ metadata:
24
+ source_code_uri: https://github.com/milouseba/acasi_api
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubygems_version: 3.0.4
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: API Acasi
44
+ test_files: []