Class: FaspClient::CapabilityActivationService
- Inherits:
-
Object
- Object
- FaspClient::CapabilityActivationService
- Defined in:
- app/services/fasp_client/capability_activation_service.rb
Instance Method Summary collapse
- #disable! ⇒ Object
- #enable! ⇒ Object
-
#initialize(provider:, capability:, version:) ⇒ CapabilityActivationService
constructor
A new instance of CapabilityActivationService.
Constructor Details
#initialize(provider:, capability:, version:) ⇒ CapabilityActivationService
Returns a new instance of CapabilityActivationService.
3 4 5 6 7 |
# File 'app/services/fasp_client/capability_activation_service.rb', line 3 def initialize(provider:, capability:, version:) @provider = provider @capability = capability @major_version = version.split(".").first end |
Instance Method Details
#disable! ⇒ Object
15 16 17 18 19 |
# File 'app/services/fasp_client/capability_activation_service.rb', line 15 def disable! HttpRequestService.new(provider: @provider).execute!( Net::HTTP::Delete.new(uri) ).code == "204" end |
#enable! ⇒ Object
9 10 11 12 13 |
# File 'app/services/fasp_client/capability_activation_service.rb', line 9 def enable! HttpRequestService.new(provider: @provider).execute!( Net::HTTP::Post.new(uri) ).code == "204" end |