|
1 | 1 | //! # Open Payments Types
|
2 | 2 | //!
|
3 |
| -//! This module contains all the type definitions for the Open Payments protocol. |
| 3 | +//! This module contains all the type definitions for the Open Payments specifications. |
4 | 4 | //! These types represent the data structures used in API requests and responses,
|
5 | 5 | //! as well as the core concepts of the Open Payments ecosystem.
|
6 | 6 | //!
|
|
23 | 23 | //! ### Common Types
|
24 | 24 | //!
|
25 | 25 | //! - [`Amount`] - Amounts of a specific currency and scale
|
26 |
| -//! - [`PageInfo`] - Pagination information |
27 |
| -//! - [`PaginatedResponse`] - Generic paginated response wrapper |
| 26 | +//! - [`Receiver`] - Receiver of a payment e.g. incoming payment |
| 27 | +//! - [`WalletAddressUri`] - Wallet address descriptor |
| 28 | +//! - [`Interval`] - ISO 8601 defined interval |
28 | 29 | //!
|
29 | 30 | //! ## Example Usage
|
30 | 31 | //!
|
31 | 32 | //! ```rust
|
32 | 33 | //! use open_payments::types::{
|
33 | 34 | //! Amount, GrantRequest, AccessTokenRequest, AccessItem, QuoteAction,
|
34 |
| -//! CreateIncomingPaymentRequest, WalletAddress |
| 35 | +//! CreateIncomingPaymentRequest, WalletAddress, IncomingPaymentAction |
35 | 36 | //! };
|
36 | 37 | //!
|
37 |
| -//! // Create a grant request for quote access |
| 38 | +//! // Create a grant request for incoming payment |
38 | 39 | //! let grant_request = GrantRequest {
|
39 | 40 | //! access_token: AccessTokenRequest {
|
40 |
| -//! access: vec![AccessItem::Quote { |
41 |
| -//! actions: vec![QuoteAction::Create, QuoteAction::Read], |
| 41 | +//! access: vec![AccessItem::IncomingPayment { |
| 42 | +//! actions: vec![IncomingPaymentAction::Create, IncomingPaymentAction::Read], |
| 43 | +//! identifier: None, |
42 | 44 | //! }],
|
43 | 45 | //! },
|
44 | 46 | //! client: "https://rafiki.money/alice".to_string(),
|
|
0 commit comments