telephone_appointments 0.1.1 → 0.2.0

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: 5f628cedc4060e5621c8bba55e3e4a3247c8fb51
4
- data.tar.gz: dca38d736d0341ec4a293d9418ac3beb2f78dd9d
3
+ metadata.gz: a0833e76d754a1c08862298b51678dd20c1944dc
4
+ data.tar.gz: de4b7cefceb040bcb9ff66bd70c743d66432ff79
5
5
  SHA512:
6
- metadata.gz: dbc842b49dfc3c8926e5e731605aec23da15dbf84f739df6f06547c33fa30c9d406f94ae9d1dbefc4881019a282c96306e34affe1c0ced3b4ff07bbaea80e6d4
7
- data.tar.gz: d57b4741da03c2f6145c6505994c5a3e0b451ce2dde7c330fc1557efabc336556131561376ab9ca971f4f06cf09c4af5bbbbfeded0d5a7dafe218490359d0d2e
6
+ metadata.gz: af6ed1168619ad462a94231e85c65d1b0bb68fe65531a063c9d8f5c99c25589b7e124b0c639fd108a3668790b2bebc8a94011027f29239f5e71d95af2b9cd184
7
+ data.tar.gz: 0d30ef66052885230217eb73bb9d8a37b5992c9aa61c9eeadcbd362feb0cd57ecfc66582682b30f20052d3b013b737c72c16380f00409391af04ad9998ab100b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.0
2
+
3
+ * Create a summary document failure activity
4
+
1
5
  ## 0.1.0
2
6
 
3
7
  * Initial release
@@ -4,13 +4,13 @@ module TelephoneAppointments
4
4
  class Api
5
5
  SSL_PORT = 443
6
6
 
7
- def post(path, form_data)
7
+ def post(path, form_data = nil)
8
8
  uri = URI.parse("#{api_uri}#{path}")
9
9
  http = Net::HTTP.new(uri.host, uri.port)
10
10
  http.read_timeout = read_timeout
11
11
  http.use_ssl = true if uri.port == SSL_PORT
12
12
  request = Net::HTTP::Post.new(uri.request_uri, headers)
13
- request.set_form_data(form_data)
13
+ request.set_form_data(form_data) if form_data
14
14
 
15
15
  TelephoneAppointments::Response.new(http.request(request))
16
16
  end
@@ -0,0 +1,15 @@
1
+ module TelephoneAppointments
2
+ class DroppedSummaryDocumentActivity
3
+ def initialize(appointment_id)
4
+ @appointment_id = appointment_id
5
+ end
6
+
7
+ def save
8
+ response = TelephoneAppointments.api.post(
9
+ "/api/v1/appointments/#{@appointment_id}/dropped_summary_documents"
10
+ )
11
+
12
+ response.success?
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module TelephoneAppointments
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
@@ -3,6 +3,7 @@ require 'telephone_appointments/api'
3
3
 
4
4
  require 'telephone_appointments/response'
5
5
  require 'telephone_appointments/summary_document_activity'
6
+ require 'telephone_appointments/dropped_summary_document_activity'
6
7
 
7
8
  require 'active_support/core_ext/module/attribute_accessors'
8
9
 
@@ -6,8 +6,8 @@ require 'telephone_appointments/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'telephone_appointments'
8
8
  spec.version = TelephoneAppointments::VERSION
9
- spec.authors = ['David Henry']
10
- spec.email = ['david@decoybecoy.com']
9
+ spec.authors = ['Ben Lovell', 'David Henry']
10
+ spec.email = ['benjamin.lovell@gmail.com', 'david@decoybecoy.com']
11
11
 
12
12
  spec.summary = 'Pension Guidance Telephone Appointment Planner API adapter'
13
13
  spec.homepage = 'https://github.com/guidance-guarantee-programme/telephone_appointments'
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telephone_appointments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Ben Lovell
7
8
  - David Henry
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2017-01-24 00:00:00.000000000 Z
12
+ date: 2017-02-24 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: activesupport
@@ -130,6 +131,7 @@ dependencies:
130
131
  version: '0'
131
132
  description:
132
133
  email:
134
+ - benjamin.lovell@gmail.com
133
135
  - david@decoybecoy.com
134
136
  executables: []
135
137
  extensions: []
@@ -148,6 +150,7 @@ files:
148
150
  - bin/setup
149
151
  - lib/telephone_appointments.rb
150
152
  - lib/telephone_appointments/api.rb
153
+ - lib/telephone_appointments/dropped_summary_document_activity.rb
151
154
  - lib/telephone_appointments/response.rb
152
155
  - lib/telephone_appointments/stub_api.rb
153
156
  - lib/telephone_appointments/summary_document_activity.rb
@@ -173,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
176
  version: '0'
174
177
  requirements: []
175
178
  rubyforge_project:
176
- rubygems_version: 2.5.1
179
+ rubygems_version: 2.6.10
177
180
  signing_key:
178
181
  specification_version: 4
179
182
  summary: Pension Guidance Telephone Appointment Planner API adapter