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