ifsApi 0.0.1 → 1.4.1

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ifsApi.rb +9 -6
  3. data/lib/ifsOrderStatus.rb +15 -3
  4. metadata +7 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f686a41c80439895e67820bdc3709468504825d0e5b38e31ea58327039fdb87
4
- data.tar.gz: 3c2c031277f8146d2812a338156ac902ee28de3771037cdf9f2812b384b6698f
3
+ metadata.gz: f996b8dc1f424a4d19eb7aaebfb60f21d46fca2cfe81273f2e57180354fa3bd6
4
+ data.tar.gz: 0e2bf465e7c1b7692249b540e2cf5d2d6a461106e81cc60cd9e9f3bff8ab3ff4
5
5
  SHA512:
6
- metadata.gz: c8052bae9a1496e6d494797c940a3bdb222f3fa0b6071c536febe98b1e6018c786a353964dc5da97bbe2844756bca688480c8b23e60829d96137536b70bd6d38
7
- data.tar.gz: b17bbdd275267323af09407666ecb6127b6810f524d795b84aefb16b615bca76d4b8e66eabd6eea426ab2f0ed5ed443892dfba880b100acdccdbee9a1e5d5efb
6
+ metadata.gz: 9b36fbed4d6a7324c99da5f8f8f22ef20e78cd2720f8f8c629d81a6f6ed8c819bf82ee5238060f4705ceca7787aaa7fb6487aa595d7c52de86d4f4dc6ce1528a
7
+ data.tar.gz: f78a2d68c205ef477f9b11994847140009dd924a2760220dcddd0ecdb83ad348dbfd58fe53a5f1b1904a58c6b186ac54e60565ad22f3371a8e9c6f9cc2c357fe
data/lib/ifsApi.rb CHANGED
@@ -6,10 +6,10 @@ require "json"
6
6
 
7
7
  module IFS
8
8
  class Api
9
+ attr_accessor :isProduction
9
10
  @userid = ""
10
11
  @password = ""
11
12
  @role = ""
12
- attr_accessor :isProduction
13
13
 
14
14
  def initialize(userid, password, role)
15
15
  @userid = userid
@@ -70,12 +70,9 @@ module IFS
70
70
  put url, {}
71
71
  end
72
72
 
73
- #PRIVATE
74
- private
75
-
76
- def baseUrl
73
+ def baseUrl()
77
74
  r = "https://nwframing.com/"
78
- if isProduction
75
+ if @isProduction == true
79
76
  r = "#{r}ifs"
80
77
  else
81
78
  r = "#{r}ifs.test"
@@ -83,6 +80,9 @@ module IFS
83
80
  "#{r}/api/#{@role}"
84
81
  end
85
82
 
83
+ #PRIVATE
84
+ private
85
+
86
86
  def endpoint(action, id = nil)
87
87
  r = "#{baseUrl}/#{action}"
88
88
  unless id.nil?
@@ -92,6 +92,7 @@ module IFS
92
92
  end
93
93
 
94
94
  def get(url, params = {})
95
+ puts "get from #{url}"
95
96
  header = basicHeader
96
97
  header[:params] = params
97
98
  begin
@@ -104,6 +105,7 @@ module IFS
104
105
  end
105
106
 
106
107
  def post(url, payload = {})
108
+ puts "post to #{url}"
107
109
  begin
108
110
  header = basicHeader
109
111
  header["Content-Type"] = "application/json"
@@ -116,6 +118,7 @@ module IFS
116
118
  end
117
119
 
118
120
  def put(url, payload = {})
121
+ puts "put to #{url}"
119
122
  begin
120
123
  header = basicHeader
121
124
  header["Content-Type"] = "application/json"
@@ -1,6 +1,18 @@
1
1
 
2
2
  module IFSOrderStatus
3
- HOLD = 1
4
- RESUME = 1
5
- CANCEL = 2
3
+ HOLD = 1
4
+ RESUME = 1
5
+ CANCEL = 2
6
+
7
+ def self.hold
8
+ HOLD
9
+ end
10
+
11
+ def self.resume
12
+ RESUME
13
+ end
14
+
15
+ def self.cancel
16
+ CANCEL
17
+ end
6
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ifsApi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Jones
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-14 00:00:00.000000000 Z
11
+ date: 2021-06-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Access IFS Api
14
14
  email: justinj@nwframing.com
@@ -21,11 +21,11 @@ files:
21
21
  - lib/ifsApiResponse.rb
22
22
  - lib/ifsHelpers.rb
23
23
  - lib/ifsOrderStatus.rb
24
- homepage:
24
+ homepage:
25
25
  licenses:
26
26
  - MIT
27
27
  metadata: {}
28
- post_install_message:
28
+ post_install_message:
29
29
  rdoc_options: []
30
30
  require_paths:
31
31
  - lib
@@ -40,9 +40,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  requirements: []
43
- rubyforge_project:
44
- rubygems_version: 2.7.6
45
- signing_key:
43
+ rubygems_version: 3.1.2
44
+ signing_key:
46
45
  specification_version: 4
47
46
  summary: ''
48
47
  test_files: []