fasttrack-client 1.0.0 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e550af164fd3e9964567dd95ec3bd9d59873d186
4
- data.tar.gz: 4907511370c8d19c267e8692e6e63131b8a3a874
3
+ metadata.gz: c57cd3ba01fb172a65ff03d04a1d76c7085297a9
4
+ data.tar.gz: bbf4d3f03954945448815b718d62cfd68ec298fe
5
5
  SHA512:
6
- metadata.gz: bdcb822a31096835b9e1b3e228ed6f7860959e98af5c0eaaaf4d90aad1b19466d05cf03e813bfae5e1fdc6cbc93f538c8132382c544ab6890ad1f87f600d6f3e
7
- data.tar.gz: b064380567856d7eb4f48feb29e7a57f0b1f19140e9a8a46d4824dc6d5d95b0598693c7bc815a2dcc7e52e7f8f0ad5ce372e91ed48a118e34eac426bcfd8c063
6
+ metadata.gz: '08af2f6542b856acf5613048e38444caa4d848e01ba2552354d5913358f669212681757423707f1180e4e720fcbbd2c0738b0f2f296478082a3594cc3edb043e'
7
+ data.tar.gz: 93961fea34af8adc873f67a18fca4cd26ff5050b3bbb8e7037e58847b64ac6d297dfa7ff4c9af2ec7e3d24e6fde19ef63aa421dbf7e8c17819eebd8062f792ba
data/lib/common.rb CHANGED
@@ -16,24 +16,24 @@ ERRORS_BY_ERROR_CODE = {
16
16
  '4' => FastTrack::InvalidVersionException
17
17
  }
18
18
 
19
- def exceptionForResponse(status, errorCode)
20
- fastTrackError = nil
19
+ def exception_for_response(status, errorCode)
20
+ fast_track_error = nil
21
21
 
22
22
  if errorCode != nil
23
- fastTrackError = ERRORS_BY_ERROR_CODE[errorCode]
23
+ fast_track_error = ERRORS_BY_ERROR_CODE[errorCode]
24
24
  end
25
25
 
26
- if fastTrackError == nil && status != nil
27
- fastTrackError = ERRORS_BY_STATUS[status.to_s]
26
+ if fast_track_error == nil && status != nil
27
+ fast_track_error = ERRORS_BY_STATUS[status.to_s]
28
28
 
29
29
  if status >= 500 && status < 600
30
- fastTrackError = FastTrack::InternalServerException
30
+ fast_track_error = FastTrack::InternalServerException
31
31
  end
32
32
  end
33
33
 
34
- if fastTrackError == nil
35
- fastTrackError = Exception
34
+ if fast_track_error == nil
35
+ fast_track_error = Exception
36
36
  end
37
37
 
38
- return fastTrackError
38
+ return fast_track_error
39
39
  end
@@ -35,20 +35,20 @@ module FastTrack
35
35
  body = {}
36
36
  end
37
37
 
38
- exception = exceptionForResponse(response.code, body['error_code'])
38
+ exception = exception_for_response(response.code, body['error_code'])
39
39
  raise exception, body['detail']
40
40
  end
41
41
  end
42
42
 
43
43
  # Retrieve company details with a `domain`
44
- def getCompany(domain)
44
+ def get_company(domain)
45
45
  return self.get PATHNAME_COMPANY, {
46
46
  'domain' => domain
47
47
  }
48
48
  end
49
49
 
50
50
  # Retrieve contact details with an `email`
51
- def getContact(email)
51
+ def get_contact(email)
52
52
  return self.get PATHNAME_CONTACT, {
53
53
  'email' => email
54
54
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fasttrack-client
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
  - Fast Track
@@ -48,7 +48,7 @@ files:
48
48
  - lib/common.rb
49
49
  - lib/constants.rb
50
50
  - lib/exceptions.rb
51
- - lib/fasttrack.rb
51
+ - lib/fasttrack-client.rb
52
52
  homepage: https://github.com/fasttrack/fasttrack-ruby
53
53
  licenses:
54
54
  - MIT