pub struct CreateSubscription { /* private fields */ }Expand description
顧客IDとプランIDを指定して、定期課金を開始します。
前払い式のため、定期課金作成時に最初の課金が実行されます。但し以下の場合には作成時の課金はされません。.
- トライアル状態(
status=trial)で作成された場合 - プランの課金日(
billing_day)が指定され、定期課金の日割り設定(prorate)が設定されていない場合.
Implementations§
Source§impl CreateSubscription
impl CreateSubscription
Sourcepub fn new(customer: impl Into<String>, plan: impl Into<String>) -> Self
pub fn new(customer: impl Into<String>, plan: impl Into<String>) -> Self
Construct a new CreateSubscription.
pub fn metadata(self, metadata: impl Into<Metadata>) -> Self
Sourcepub fn trial_end(self, trial_end: impl Into<CreateSubscriptionTrialEnd>) -> Self
pub fn trial_end(self, trial_end: impl Into<CreateSubscriptionTrialEnd>) -> Self
リクエスト時より未来のタイムスタンプ(5年後まで) or 文字列 now が指定可能です。.
Source§impl CreateSubscription
impl CreateSubscription
Sourcepub async fn send<C: PayjpClient>(
&self,
client: &C,
) -> Result<<Self as PayjpRequest>::Output, C::Err>
pub async fn send<C: PayjpClient>( &self, client: &C, ) -> Result<<Self as PayjpRequest>::Output, C::Err>
Send the request and return the deserialized response.
Sourcepub fn send_blocking<C: BlockingClient>(
&self,
client: &C,
) -> Result<<Self as PayjpRequest>::Output, C::Err>
pub fn send_blocking<C: BlockingClient>( &self, client: &C, ) -> Result<<Self as PayjpRequest>::Output, C::Err>
Send the request and return the deserialized response, blocking until completion.
Trait Implementations§
Source§impl Clone for CreateSubscription
impl Clone for CreateSubscription
Source§fn clone(&self) -> CreateSubscription
fn clone(&self) -> CreateSubscription
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateSubscription
impl Debug for CreateSubscription
Source§impl PayjpRequest for CreateSubscription
impl PayjpRequest for CreateSubscription
Source§type Output = Subscription
type Output = Subscription
The data returned from the eventual API call.
Source§fn build(&self) -> RequestBuilder
fn build(&self) -> RequestBuilder
Convert the struct into library-agnostic data that can be used by compatible
clients to make API calls.
Source§fn customize(&self) -> CustomizablePayjpRequest<Self::Output>
fn customize(&self) -> CustomizablePayjpRequest<Self::Output>
Convert to a builder allowing per-request customization.
Auto Trait Implementations§
impl Freeze for CreateSubscription
impl RefUnwindSafe for CreateSubscription
impl Send for CreateSubscription
impl Sync for CreateSubscription
impl Unpin for CreateSubscription
impl UnwindSafe for CreateSubscription
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more