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
private
A new instance of Programs.
-
#list(cursor: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Program>
Some parameter documentations has been truncated, see Models::ProgramListParams for more details.
-
#retrieve(program_id, request_options: {}) ⇒ Increase::Models::Program
Retrieve a Program.
Constructor Details
#initialize(client:) ⇒ Programs
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Programs.
57 58 59 |
# File 'lib/increase/resources/programs.rb', line 57 def initialize(client:) @client = client end |
Instance Method Details
#list(cursor: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Program>
Some parameter documentations has been truncated, see Models::ProgramListParams for more details.
List Programs
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/increase/resources/programs.rb', line 42 def list(params = {}) parsed, = Increase::ProgramListParams.dump_request(params) @client.request( method: :get, path: "programs", query: parsed, page: Increase::Internal::Page, model: Increase::Program, options: ) end |
#retrieve(program_id, request_options: {}) ⇒ Increase::Models::Program
Retrieve a Program
17 18 19 20 21 22 23 24 |
# File 'lib/increase/resources/programs.rb', line 17 def retrieve(program_id, params = {}) @client.request( method: :get, path: ["programs/%1$s", program_id], model: Increase::Program, options: params[:request_options] ) end |