Sha256: e2a88e11d683083b59b125557ea8c860d9ec1b3429f751592afc3f49fb25f5b8
Contents?: true
Size: 1.09 KB
Versions: 4
Compression:
Stored size: 1.09 KB
Contents
require 'iyzipay' require_relative 'options.rb' # ------------------------------------------------------------- # ------------------------------------------------------------- # Subscription Plan API end-point # ------------------------------------------------------------- # ------------------------------------------------------------- plan = Iyzipay::Model::V2::Plan.new # Create new plan plan_create_params = { locale: Iyzipay::Model::Locale::TR, conversationId: '12341234', productReferenceCode: 'YOUR_PRODUCT_REFERENCE_CODE', name: 'Plan Name', price: 100.00, currencyCode: 'TL', paymentInterval: 'MONTHLY', paymentIntervalCount: 1, trialPeriodDays: 7, planPaymentType: 'RECURRING' } result = plan.create(plan_create_params, @options) puts "Plan create: #{result}" # Update plan plan_update_params = { locale: Iyzipay::Model::Locale::TR, conversationId: '12341234', pricingPlanReferenceCode: 'YOUR_PRICING_PLAN_REFERENCE_CODE', name: 'Update Plan', trialPeriodDays: 3, } result = plan.update(plan_update_params, @options) puts "Plan update: #{result}"
Version data entries
4 entries across 4 versions & 2 rubygems