flow_account_ruby 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 991bc96abab8e977513efa79bc6ba773aa6dfe66
4
- data.tar.gz: ea1457f42e20eec65fd6cd0af54099b3dd795413
3
+ metadata.gz: 83540c71012745ea10a920cc7daa2f130376dbf3
4
+ data.tar.gz: b1c252c7ff847ca4dcd273d7482259576c385f1a
5
5
  SHA512:
6
- metadata.gz: 77cdc5d71053c374c4b37ddf49c256ca77d99bb239d11c316af9b92d58172bafb217d0732e86aa40aa2de364fbcafab588b00398b4657bbb09dca435b5e248e2
7
- data.tar.gz: 2eea936ee4cafa0f305f556035e7ae3eeafb52d8248e9f5d91a2707d3d5af99507eff306d00d9d98d21decabf0f39f6725e51eceeff07ef671b38c256ba93c51
6
+ metadata.gz: ae4fd9b21440d33b781c7cb90f444e7aab27e231f6c0acb2ad900cdd8fe4ac80902cb621123c1e672130c97250be70c15e591e7d3ca88b97ed5bc831703300e4
7
+ data.tar.gz: 065db8e8b01e2b743a046f3a19a363d9f05c2a91b2725acc3835a424106934b0b849c960aff11dd9f71eb17cee13a2e9971061a18896129e5961d7d235b21978
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
+ *.gem
2
+
1
3
  /.bundle/
2
4
  /.yardoc
3
5
  /Gemfile.lock
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # FlowAccount
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/flow_account`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ A Ruby wrapper for the Flow Account REST APIs
6
4
 
7
5
  ## Installation
8
6
 
@@ -29,7 +27,7 @@ FlowAccount.configure do |config|
29
27
  config.loud_logger = true # for development logging
30
28
  end
31
29
 
32
- token = FlowAccount.get_access_token
30
+ token = FlowAccount.get_access_token.access_token
33
31
  client = FlowAccount.client(access_token: token)
34
32
  client.tax_invoices # get all tax-invoices
35
33
  ```
data/flow_account.gemspec CHANGED
@@ -25,7 +25,9 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
27
  spec.add_development_dependency "webmock", "~> 3.0"
28
- spec.add_runtime_dependency 'faraday', '~> 0.12'
29
- spec.add_runtime_dependency 'faraday_middleware', '~> 0.11'
28
+ spec.add_runtime_dependency 'faraday', '~> 0.9'
29
+ spec.add_runtime_dependency 'faraday_middleware', '~> 0.9'
30
+ spec.add_runtime_dependency 'hashie', '>= 0.4.0'
31
+
30
32
 
31
33
  end
@@ -0,0 +1,23 @@
1
+ module FlowAccount
2
+ class Client
3
+ module Invoice
4
+
5
+ def create_invoice(params)
6
+ post('billing-notes', params)
7
+ end
8
+
9
+ def invoice(id)
10
+ get("billing-notes/#{id}")
11
+ end
12
+
13
+ def invoices(offset=0, limit=10)
14
+ get("billing-notes", {offset: offset, limit: limit})
15
+ end
16
+
17
+ def invoice_link(id, lang=:en)
18
+ get("billing-notes/#{id}/#{lang}/share-link")
19
+ end
20
+
21
+ end
22
+ end
23
+ end
@@ -3,6 +3,7 @@ module FlowAccount
3
3
  Dir[File.expand_path('../client/*.rb', __FILE__)].each{|f| require f}
4
4
 
5
5
  include FlowAccount::Client::TaxInvoice
6
+ include FlowAccount::Client::Invoice
6
7
  include FlowAccount::Client::PurchaseOrder
7
8
  end
8
9
  end
@@ -1,3 +1,3 @@
1
1
  module FlowAccount
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flow_account_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chirag Rajkarnikar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-04 00:00:00.000000000 Z
11
+ date: 2017-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,28 +72,42 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.12'
75
+ version: '0.9'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.12'
82
+ version: '0.9'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: faraday_middleware
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.11'
89
+ version: '0.9'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.11'
96
+ version: '0.9'
97
+ - !ruby/object:Gem::Dependency
98
+ name: hashie
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 0.4.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 0.4.0
97
111
  description: A Ruby wrapper for the Flow Account REST APIs
98
112
  email:
99
113
  - chiragrajk@gmail.com
@@ -119,6 +133,7 @@ files:
119
133
  - lib/flow_account/api.rb
120
134
  - lib/flow_account/auth.rb
121
135
  - lib/flow_account/client.rb
136
+ - lib/flow_account/client/invoice.rb
122
137
  - lib/flow_account/client/purchase_order.rb
123
138
  - lib/flow_account/client/tax_invoice.rb
124
139
  - lib/flow_account/configuration.rb