Class: Lithic::Resources::NetworkPrograms
- Inherits:
-
Object
- Object
- Lithic::Resources::NetworkPrograms
- Defined in:
- lib/lithic/resources/network_programs.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ NetworkPrograms
constructor
private
A new instance of NetworkPrograms.
-
#list(begin_: nil, end_: nil, page_size: nil, request_options: {}) ⇒ Lithic::Internal::SinglePage<Lithic::Models::NetworkProgram>
Some parameter documentations has been truncated, see Models::NetworkProgramListParams for more details.
-
#retrieve(network_program_token, request_options: {}) ⇒ Lithic::Models::NetworkProgram
Get network program.
Constructor Details
#initialize(client:) ⇒ NetworkPrograms
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 NetworkPrograms.
59 60 61 |
# File 'lib/lithic/resources/network_programs.rb', line 59 def initialize(client:) @client = client end |
Instance Method Details
#list(begin_: nil, end_: nil, page_size: nil, request_options: {}) ⇒ Lithic::Internal::SinglePage<Lithic::Models::NetworkProgram>
Some parameter documentations has been truncated, see Models::NetworkProgramListParams for more details.
List network programs.
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/lithic/resources/network_programs.rb', line 44 def list(params = {}) parsed, = Lithic::NetworkProgramListParams.dump_request(params) @client.request( method: :get, path: "v1/network_programs", query: parsed.transform_keys(begin_: "begin", end_: "end"), page: Lithic::Internal::SinglePage, model: Lithic::NetworkProgram, options: ) end |
#retrieve(network_program_token, request_options: {}) ⇒ Lithic::Models::NetworkProgram
Get network program.
17 18 19 20 21 22 23 24 |
# File 'lib/lithic/resources/network_programs.rb', line 17 def retrieve(network_program_token, params = {}) @client.request( method: :get, path: ["v1/network_programs/%1$s", network_program_token], model: Lithic::NetworkProgram, options: params[:request_options] ) end |