Class: Increase::Resources::Programs
- Inherits:
-
Object
- Object
- Increase::Resources::Programs
- Defined in:
- lib/increase/resources/programs.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Programs
constructor
A new instance of Programs.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Program>
List Programs.
-
#retrieve(program_id, opts = {}) ⇒ Increase::Models::Program
Retrieve a Program.
Constructor Details
#initialize(client:) ⇒ Programs
Returns a new instance of Programs.
6 7 8 |
# File 'lib/increase/resources/programs.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Program>
List Programs
34 35 36 37 38 39 40 41 42 |
# File 'lib/increase/resources/programs.rb', line 34 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/programs" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::Program @client.request(req, opts) end |
#retrieve(program_id, opts = {}) ⇒ Increase::Models::Program
Retrieve a Program
16 17 18 19 20 21 22 |
# File 'lib/increase/resources/programs.rb', line 16 def retrieve(program_id, opts = {}) req = {} req[:method] = :get req[:path] = "/programs/#{program_id}" req[:model] = Increase::Models::Program @client.request(req, opts) end |