Class: Lithic::Resources::CardBulkOrders
- Inherits:
-
Object
- Object
- Lithic::Resources::CardBulkOrders
- Defined in:
- lib/lithic/resources/card_bulk_orders.rb
Instance Method Summary collapse
-
#create(customer_product_id:, shipping_address:, shipping_method:, request_options: {}) ⇒ Lithic::Models::CardBulkOrder
Some parameter documentations has been truncated, see Models::CardBulkOrderCreateParams for more details.
-
#initialize(client:) ⇒ CardBulkOrders
constructor
private
A new instance of CardBulkOrders.
-
#list(begin_: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::CardBulkOrder>
Some parameter documentations has been truncated, see Models::CardBulkOrderListParams for more details.
-
#retrieve(bulk_order_token, request_options: {}) ⇒ Lithic::Models::CardBulkOrder
Retrieve a specific bulk order by token [BETA].
-
#update(bulk_order_token, status:, request_options: {}) ⇒ Lithic::Models::CardBulkOrder
Update a bulk order [BETA].
Constructor Details
#initialize(client:) ⇒ CardBulkOrders
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 CardBulkOrders.
122 123 124 |
# File 'lib/lithic/resources/card_bulk_orders.rb', line 122 def initialize(client:) @client = client end |
Instance Method Details
#create(customer_product_id:, shipping_address:, shipping_method:, request_options: {}) ⇒ Lithic::Models::CardBulkOrder
Some parameter documentations has been truncated, see Models::CardBulkOrderCreateParams for more details.
Create a new bulk order for physical card shipments [BETA]. Cards can be added to the order via the POST /v1/cards endpoint by specifying the bulk_order_token. Lock the order via PATCH /v1/card_bulk_orders/bulk_order_token to prepare for shipment. Please work with your Customer Success Manager and card personalization bureau to ensure bulk shipping is supported for your program.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/lithic/resources/card_bulk_orders.rb', line 29 def create(params) parsed, = Lithic::CardBulkOrderCreateParams.dump_request(params) @client.request( method: :post, path: "v1/card_bulk_orders", body: parsed, model: Lithic::CardBulkOrder, options: ) end |
#list(begin_: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::CardBulkOrder>
Some parameter documentations has been truncated, see Models::CardBulkOrderListParams for more details.
List bulk orders for physical card shipments [BETA]
107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/lithic/resources/card_bulk_orders.rb', line 107 def list(params = {}) parsed, = Lithic::CardBulkOrderListParams.dump_request(params) @client.request( method: :get, path: "v1/card_bulk_orders", query: parsed.transform_keys(begin_: "begin", end_: "end"), page: Lithic::Internal::CursorPage, model: Lithic::CardBulkOrder, options: ) end |
#retrieve(bulk_order_token, request_options: {}) ⇒ Lithic::Models::CardBulkOrder
Retrieve a specific bulk order by token [BETA]
51 52 53 54 55 56 57 58 |
# File 'lib/lithic/resources/card_bulk_orders.rb', line 51 def retrieve(bulk_order_token, params = {}) @client.request( method: :get, path: ["v1/card_bulk_orders/%1$s", bulk_order_token], model: Lithic::CardBulkOrder, options: params[:request_options] ) end |
#update(bulk_order_token, status:, request_options: {}) ⇒ Lithic::Models::CardBulkOrder
Update a bulk order [BETA]. Primarily used to lock the order, preventing additional cards from being added
74 75 76 77 78 79 80 81 82 83 |
# File 'lib/lithic/resources/card_bulk_orders.rb', line 74 def update(bulk_order_token, params) parsed, = Lithic::CardBulkOrderUpdateParams.dump_request(params) @client.request( method: :patch, path: ["v1/card_bulk_orders/%1$s", bulk_order_token], body: parsed, model: Lithic::CardBulkOrder, options: ) end |