---
url: "https://pay.weixin.qq.com/doc/v3/partner/4019557780-go.md"
title: "提交停车场进件申请-请求示例-go"
doc_id: 4019557780
example_lang: "go"
---

## Go


需配合微信支付工具库 wxpay\_utility 使用，请参考 [Go](https://pay.weixin.qq.com/doc/v3/partner/4015119446.md)

```
package main

import (
	"bytes"
	"demo/wxpay_utility" // 引用微信支付工具库，参考 https://pay.weixin.qq.com/doc/v3/partner/4015119446
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
)

func main() {
	// TODO: 请准备商户开发必要参数，参考：https://pay.weixin.qq.com/doc/v3/partner/4013080340
	config, err := wxpay_utility.CreateMchConfig(
		"19xxxxxxxx",                 // 商户号，是由微信支付系统生成并分配给每个商户的唯一标识符，商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/partner/4013080340
		"1DDE55AD98Exxxxxxxxxx",      // 商户API证书序列号，如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013058924
		"/path/to/apiclient_key.pem", // 商户API证书私钥文件路径，本地文件路径
		"PUB_KEY_ID_xxxxxxxxxxxxx",   // 微信支付公钥ID，如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013038589
		"/path/to/wxp_pub.pem",       // 微信支付公钥文件路径，本地文件路径
	)
	if err != nil {
		fmt.Println(err)
		return
	}

	request := &SubmitApplicationRequest{
		ParkingLot: &ParkingLot{
			ParkingLotName:            wxpay_utility.String("腾讯大厦停车场"),
			OutParkingLotId:           wxpay_utility.String("lot_sz_tencent_001"),
			ParkingLotAddress:         wxpay_utility.String("广东省深圳市南山区科技中一道10000号"),
			Longitude:                 wxpay_utility.String("113.934528"),
			Latitude:                  wxpay_utility.String("22.540503"),
			ParkingLotType:            PARKINGLOTTYPE_PARKING_LOT_TYPE_UNKNOWN.Ptr(),
			PhoneNumber:               wxpay_utility.String("0755-86013388"),
			ParkingSignUrl:            wxpay_utility.String("https://example.com/parking_sign.jpg"),
			NotificationTextList:      []string{"example_NotificationTextList"},
			PaymentMiniProgAppid:      wxpay_utility.String("wx1234567890abcdef"),
			PaymentPath:               wxpay_utility.String("/pages/pay/index?park_uuid=xxx"),
			ParkingOrderMiniProgAppid: wxpay_utility.String("wx1234567890abcdef"),
			ParkingOrderPath:          wxpay_utility.String("/pages/order/index"),
			ChargingRule: &ChargingRule{
				RuleType:          CHARGINGRULETYPE_CHARGING_RULE_UNKNOWN.Ptr(),
				FeeLimitType:      FEELIMITTYPE_FEE_LIMIT_UNKNOWN.Ptr(),
				DailyLimitType:    DAILYLIMITTYPE_DAILY_LIMIT_UNKNOWN.Ptr(),
				TimeRoundingType:  TIMEROUNDINGTYPE_TIME_ROUND_UNKNOWN.Ptr(),
				FreeEntryDuration: wxpay_utility.Int64(1),
				FreeExitDuration:  wxpay_utility.Int64(1),
				FixedIntervalRule: []FixedIntervalRule{FixedIntervalRule{
					DayType:                   DAYTYPE_DAY_TYPE_UNKNOWN.Ptr(),
					StartTime:                 wxpay_utility.String("08:00"),
					EndTime:                   wxpay_utility.String("22:00"),
					VehicleType:               VEHICLETYPE_VEHICLE_TYPE_UNKNOWN.Ptr(),
					PlateType:                 PLATETYPE_PLATE_TYPE_UNKNOWN.Ptr(),
					FirstDuration:             wxpay_utility.Int64(1),
					FirstAmount:               wxpay_utility.Int64(1),
					IntervalDuration:          wxpay_utility.Int64(1),
					IntervalAmount:            wxpay_utility.Int64(1),
					IntervalMaxAmount:         wxpay_utility.Int64(1),
					MaxFeePerDay:              wxpay_utility.Int64(1),
					FreePeriodChargingMode:    FREEPERIODCHARGINGMODE_FREE_PERIOD_CHARGING_UNKNOWN.Ptr(),
					FreePeriodCalculationMode: FREEPERIODCALCULATIONMODE_FREE_PERIOD_CAL_UNKNOWN.Ptr(),
					IsGreenVehicleFreeParking: wxpay_utility.Bool(false),
					FirstDurationMode:         FIRSTDURATIONMODE_FIRST_DURATION_MODE_UNKNOWN.Ptr(),
				}},
				DurationSegmentRule: []DurationSegmentRule{DurationSegmentRule{
					DayType:           DAYTYPE_DAY_TYPE_UNKNOWN.Ptr(),
					StartTime:         wxpay_utility.String("08:00"),
					EndTime:           wxpay_utility.String("22:00"),
					VehicleType:       VEHICLETYPE_VEHICLE_TYPE_UNKNOWN.Ptr(),
					PlateType:         PLATETYPE_PLATE_TYPE_UNKNOWN.Ptr(),
					ChargeMode:        CHARGEMODE_UNKNOWN.Ptr(),
					DurationFrom:      wxpay_utility.Int64(1),
					DurationTo:        wxpay_utility.Int64(1),
					FixedAmount:       wxpay_utility.Int64(1),
					IntervalMin:       wxpay_utility.Int64(1),
					IntervalAmount:    wxpay_utility.Int64(1),
					IntervalMaxAmount: wxpay_utility.Int64(1),
					MaxFeePerDay:      wxpay_utility.Int64(1),
				}},
				PreEntryRule: []PreEntryRule{PreEntryRule{
					DayType:      DAYTYPE_DAY_TYPE_UNKNOWN.Ptr(),
					StartTime:    wxpay_utility.String("08:00"),
					EndTime:      wxpay_utility.String("22:00"),
					VehicleType:  VEHICLETYPE_VEHICLE_TYPE_UNKNOWN.Ptr(),
					PlateType:    PLATETYPE_PLATE_TYPE_UNKNOWN.Ptr(),
					Amount:       wxpay_utility.Int64(1),
					MaxFeePerDay: wxpay_utility.Int64(1),
				}},
				HolidayMode:         HOLIDAYMODE_HOLIDAY_MODE_UNKNOWN.Ptr(),
				AggregateLimitMode:  AGGREGATELIMITMODE_AGGREGATE_LIMIT_MODE_UNKNOWN.Ptr(),
				FirstChargeTimeMode: FIRSTCHARGETIMEMODE_FIRST_CHARGE_TIME_MODE_UNKNOWN.Ptr(),
			},
		},
	}

	response, err := SubmitApplication(config, request)
	if err != nil {
		fmt.Printf("请求失败: %+v\n", err)
		// TODO: 请求失败，根据状态码执行不同的处理
		return
	}

	// TODO: 请求成功，继续业务逻辑
	fmt.Printf("请求成功: %+v\n", response)
}

func SubmitApplication(config *wxpay_utility.MchConfig, request *SubmitApplicationRequest) (response *SubmitApplicationResponse, err error) {
	const (
		host   = "https://api.mch.weixin.qq.com"
		method = "POST"
		path   = "/v3/parking/reminders/application"
	)

	reqUrl, err := url.Parse(fmt.Sprintf("%s%s", host, path))
	if err != nil {
		return nil, err
	}
	reqBody, err := json.Marshal(request)
	if err != nil {
		return nil, err
	}
	httpRequest, err := http.NewRequest(method, reqUrl.String(), bytes.NewReader(reqBody))
	if err != nil {
		return nil, err
	}
	httpRequest.Header.Set("Accept", "application/json")
	httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId())
	httpRequest.Header.Set("Content-Type", "application/json")
	authorization, err := wxpay_utility.BuildAuthorization(config.MchId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), reqBody)
	if err != nil {
		return nil, err
	}
	httpRequest.Header.Set("Authorization", authorization)

	client := &http.Client{}
	httpResponse, err := client.Do(httpRequest)
	if err != nil {
		return nil, err
	}
	respBody, err := wxpay_utility.ExtractResponseBody(httpResponse)
	if err != nil {
		return nil, err
	}
	if httpResponse.StatusCode >= 200 && httpResponse.StatusCode < 300 {
		// 2XX 成功，验证应答签名
		err = wxpay_utility.ValidateResponse(
			config.WechatPayPublicKeyId(),
			config.WechatPayPublicKey(),
			&httpResponse.Header,
			respBody,
		)
		if err != nil {
			return nil, err
		}
		response := &SubmitApplicationResponse{}
		if err := json.Unmarshal(respBody, response); err != nil {
			return nil, err
		}

		return response, nil
	} else {
		return nil, wxpay_utility.NewApiException(
			httpResponse.StatusCode,
			httpResponse.Header,
			respBody,
		)
	}
}

type SubmitApplicationRequest struct {
	ParkingLot *ParkingLot `json:"parking_lot,omitempty"`
}

type SubmitApplicationResponse struct {
	Code              *string `json:"code,omitempty"`
	Message           *string `json:"message,omitempty"`
	ParkingLotAuditNo *string `json:"parking_lot_audit_no,omitempty"`
}

type ParkingLot struct {
	ParkingLotName            *string         `json:"parking_lot_name,omitempty"`
	OutParkingLotId           *string         `json:"out_parking_lot_id,omitempty"`
	ParkingLotAddress         *string         `json:"parking_lot_address,omitempty"`
	Longitude                 *string         `json:"longitude,omitempty"`
	Latitude                  *string         `json:"latitude,omitempty"`
	ParkingLotType            *ParkingLotType `json:"parking_lot_type,omitempty"`
	PhoneNumber               *string         `json:"phone_number,omitempty"`
	ParkingSignUrl            *string         `json:"parking_sign_url,omitempty"`
	NotificationTextList      []string        `json:"notification_text_list,omitempty"`
	PaymentMiniProgAppid      *string         `json:"payment_mini_prog_appid,omitempty"`
	PaymentPath               *string         `json:"payment_path,omitempty"`
	ParkingOrderMiniProgAppid *string         `json:"parking_order_mini_prog_appid,omitempty"`
	ParkingOrderPath          *string         `json:"parking_order_path,omitempty"`
	ChargingRule              *ChargingRule   `json:"charging_rule,omitempty"`
}

type ParkingLotType string

func (e ParkingLotType) Ptr() *ParkingLotType {
	return &e
}

const (
	PARKINGLOTTYPE_PARKING_LOT_TYPE_UNKNOWN               ParkingLotType = "PARKING_LOT_TYPE_UNKNOWN"
	PARKINGLOTTYPE_PARKING_LOT_TYPE_BUSINESS_DISTRICT     ParkingLotType = "PARKING_LOT_TYPE_BUSINESS_DISTRICT"
	PARKINGLOTTYPE_PARKING_LOT_TYPE_OFFICE_BUILDING       ParkingLotType = "PARKING_LOT_TYPE_OFFICE_BUILDING"
	PARKINGLOTTYPE_PARKING_LOT_TYPE_TRANSPORTATION_HUB    ParkingLotType = "PARKING_LOT_TYPE_TRANSPORTATION_HUB"
	PARKINGLOTTYPE_PARKING_LOT_TYPE_RESIDENTIAL_AREA      ParkingLotType = "PARKING_LOT_TYPE_RESIDENTIAL_AREA"
	PARKINGLOTTYPE_PARKING_LOT_TYPE_PARK_AREA             ParkingLotType = "PARKING_LOT_TYPE_PARK_AREA"
	PARKINGLOTTYPE_PARKING_LOT_TYPE_OTHER_PUBLIC_FACILITY ParkingLotType = "PARKING_LOT_TYPE_OTHER_PUBLIC_FACILITY"
)

type ChargingRule struct {
	RuleType            *ChargingRuleType     `json:"rule_type,omitempty"`
	FeeLimitType        *FeeLimitType         `json:"fee_limit_type,omitempty"`
	DailyLimitType      *DailyLimitType       `json:"daily_limit_type,omitempty"`
	TimeRoundingType    *TimeRoundingType     `json:"time_rounding_type,omitempty"`
	FreeEntryDuration   *int64                `json:"free_entry_duration,omitempty"`
	FreeExitDuration    *int64                `json:"free_exit_duration,omitempty"`
	FixedIntervalRule   []FixedIntervalRule   `json:"fixed_interval_rule,omitempty"`
	DurationSegmentRule []DurationSegmentRule `json:"duration_segment_rule,omitempty"`
	PreEntryRule        []PreEntryRule        `json:"pre_entry_rule,omitempty"`
	HolidayMode         *HolidayMode          `json:"holiday_mode,omitempty"`
	AggregateLimitMode  *AggregateLimitMode   `json:"aggregate_limit_mode,omitempty"`
	FirstChargeTimeMode *FirstChargeTimeMode  `json:"first_charge_time_mode,omitempty"`
}

type ChargingRuleType string

func (e ChargingRuleType) Ptr() *ChargingRuleType {
	return &e
}

const (
	CHARGINGRULETYPE_CHARGING_RULE_UNKNOWN        ChargingRuleType = "CHARGING_RULE_UNKNOWN"
	CHARGINGRULETYPE_CHARGING_RULE_FIXED_INTERVAL ChargingRuleType = "CHARGING_RULE_FIXED_INTERVAL"
	CHARGINGRULETYPE_CHARGING_RULE_SEGMENT        ChargingRuleType = "CHARGING_RULE_SEGMENT"
	CHARGINGRULETYPE_CHARGING_RULE_PER_ENTRY      ChargingRuleType = "CHARGING_RULE_PER_ENTRY"
)

type FeeLimitType string

func (e FeeLimitType) Ptr() *FeeLimitType {
	return &e
}

const (
	FEELIMITTYPE_FEE_LIMIT_UNKNOWN   FeeLimitType = "FEE_LIMIT_UNKNOWN"
	FEELIMITTYPE_FEE_LIMIT_AGGREGATE FeeLimitType = "FEE_LIMIT_AGGREGATE"
	FEELIMITTYPE_FEE_LIMIT_SINGLE    FeeLimitType = "FEE_LIMIT_SINGLE"
)

type DailyLimitType string

func (e DailyLimitType) Ptr() *DailyLimitType {
	return &e
}

const (
	DAILYLIMITTYPE_DAILY_LIMIT_UNKNOWN      DailyLimitType = "DAILY_LIMIT_UNKNOWN"
	DAILYLIMITTYPE_DAILY_LIMIT_ROLLING_24_H DailyLimitType = "DAILY_LIMIT_ROLLING_24H"
	DAILYLIMITTYPE_DAILY_LIMIT_CALENDAR_DAY DailyLimitType = "DAILY_LIMIT_CALENDAR_DAY"
)

type TimeRoundingType string

func (e TimeRoundingType) Ptr() *TimeRoundingType {
	return &e
}

const (
	TIMEROUNDINGTYPE_TIME_ROUND_UNKNOWN TimeRoundingType = "TIME_ROUND_UNKNOWN"
	TIMEROUNDINGTYPE_TIME_ROUND_DOWN    TimeRoundingType = "TIME_ROUND_DOWN"
	TIMEROUNDINGTYPE_TIME_ROUND_UP      TimeRoundingType = "TIME_ROUND_UP"
)

type FixedIntervalRule struct {
	DayType                   *DayType                   `json:"day_type,omitempty"`
	StartTime                 *string                    `json:"start_time,omitempty"`
	EndTime                   *string                    `json:"end_time,omitempty"`
	VehicleType               *VehicleType               `json:"vehicle_type,omitempty"`
	PlateType                 *PlateType                 `json:"plate_type,omitempty"`
	FirstDuration             *int64                     `json:"first_duration,omitempty"`
	FirstAmount               *int64                     `json:"first_amount,omitempty"`
	IntervalDuration          *int64                     `json:"interval_duration,omitempty"`
	IntervalAmount            *int64                     `json:"interval_amount,omitempty"`
	IntervalMaxAmount         *int64                     `json:"interval_max_amount,omitempty"`
	MaxFeePerDay              *int64                     `json:"max_fee_per_day,omitempty"`
	FreePeriodChargingMode    *FreePeriodChargingMode    `json:"free_period_charging_mode,omitempty"`
	FreePeriodCalculationMode *FreePeriodCalculationMode `json:"free_period_calculation_mode,omitempty"`
	IsGreenVehicleFreeParking *bool                      `json:"is_green_vehicle_free_parking,omitempty"`
	FirstDurationMode         *FirstDurationMode         `json:"first_duration_mode,omitempty"`
}

type DurationSegmentRule struct {
	DayType           *DayType     `json:"day_type,omitempty"`
	StartTime         *string      `json:"start_time,omitempty"`
	EndTime           *string      `json:"end_time,omitempty"`
	VehicleType       *VehicleType `json:"vehicle_type,omitempty"`
	PlateType         *PlateType   `json:"plate_type,omitempty"`
	ChargeMode        *ChargeMode  `json:"charge_mode,omitempty"`
	DurationFrom      *int64       `json:"duration_from,omitempty"`
	DurationTo        *int64       `json:"duration_to,omitempty"`
	FixedAmount       *int64       `json:"fixed_amount,omitempty"`
	IntervalMin       *int64       `json:"interval_min,omitempty"`
	IntervalAmount    *int64       `json:"interval_amount,omitempty"`
	IntervalMaxAmount *int64       `json:"interval_max_amount,omitempty"`
	MaxFeePerDay      *int64       `json:"max_fee_per_day,omitempty"`
}

type PreEntryRule struct {
	DayType      *DayType     `json:"day_type,omitempty"`
	StartTime    *string      `json:"start_time,omitempty"`
	EndTime      *string      `json:"end_time,omitempty"`
	VehicleType  *VehicleType `json:"vehicle_type,omitempty"`
	PlateType    *PlateType   `json:"plate_type,omitempty"`
	Amount       *int64       `json:"amount,omitempty"`
	MaxFeePerDay *int64       `json:"max_fee_per_day,omitempty"`
}

type HolidayMode string

func (e HolidayMode) Ptr() *HolidayMode {
	return &e
}

const (
	HOLIDAYMODE_HOLIDAY_MODE_UNKNOWN        HolidayMode = "HOLIDAY_MODE_UNKNOWN"
	HOLIDAYMODE_HOLIDAY_MODE_LEGAL_MODY     HolidayMode = "HOLIDAY_MODE_LEGAL_MODY"
	HOLIDAYMODE_HOLIDAY_MODE_CALENDAR_MODY  HolidayMode = "HOLIDAY_MODE_CALENDAR_MODY"
	HOLIDAYMODE_HOLIDAY_MODE_FINANCIAL_MODY HolidayMode = "HOLIDAY_MODE_FINANCIAL_MODY"
)

type AggregateLimitMode string

func (e AggregateLimitMode) Ptr() *AggregateLimitMode {
	return &e
}

const (
	AGGREGATELIMITMODE_AGGREGATE_LIMIT_MODE_UNKNOWN AggregateLimitMode = "AGGREGATE_LIMIT_MODE_UNKNOWN"
	AGGREGATELIMITMODE_AGGREGATE_LIMIT_MODE_NORMAL  AggregateLimitMode = "AGGREGATE_LIMIT_MODE_NORMAL"
	AGGREGATELIMITMODE_AGGREGATE_LIMIT_MODE_MIN     AggregateLimitMode = "AGGREGATE_LIMIT_MODE_MIN"
)

type FirstChargeTimeMode string

func (e FirstChargeTimeMode) Ptr() *FirstChargeTimeMode {
	return &e
}

const (
	FIRSTCHARGETIMEMODE_FIRST_CHARGE_TIME_MODE_UNKNOWN    FirstChargeTimeMode = "FIRST_CHARGE_TIME_MODE_UNKNOWN"
	FIRSTCHARGETIMEMODE_FIRST_CHARGE_TIME_MODE_ENTER      FirstChargeTimeMode = "FIRST_CHARGE_TIME_MODE_ENTER"
	FIRSTCHARGETIMEMODE_FIRST_CHARGE_TIME_MODE_AFTER_FREE FirstChargeTimeMode = "FIRST_CHARGE_TIME_MODE_AFTER_FREE"
)

type DayType string

func (e DayType) Ptr() *DayType {
	return &e
}

const (
	DAYTYPE_DAY_TYPE_UNKNOWN DayType = "DAY_TYPE_UNKNOWN"
	DAYTYPE_DAY_TYPE_WEEKDAY DayType = "DAY_TYPE_WEEKDAY"
	DAYTYPE_DAY_TYPE_HOLIDAY DayType = "DAY_TYPE_HOLIDAY"
	DAYTYPE_DAY_TYPE_ALL_DAY DayType = "DAY_TYPE_ALL_DAY"
)

type VehicleType string

func (e VehicleType) Ptr() *VehicleType {
	return &e
}

const (
	VEHICLETYPE_VEHICLE_TYPE_UNKNOWN     VehicleType = "VEHICLE_TYPE_UNKNOWN"
	VEHICLETYPE_VEHICLE_TYPE_SMALL       VehicleType = "VEHICLE_TYPE_SMALL"
	VEHICLETYPE_VEHICLE_TYPE_LARGE       VehicleType = "VEHICLE_TYPE_LARGE"
	VEHICLETYPE_VEHICLE_TYPE_EXTRA_LARGE VehicleType = "VEHICLE_TYPE_EXTRA_LARGE"
	VEHICLETYPE_VEHICLE_TYPE_ALL_TYPE    VehicleType = "VEHICLE_TYPE_ALL_TYPE"
)

type PlateType string

func (e PlateType) Ptr() *PlateType {
	return &e
}

const (
	PLATETYPE_PLATE_TYPE_UNKNOWN   PlateType = "PLATE_TYPE_UNKNOWN"
	PLATETYPE_PLATE_TYPE_TEMPORARY PlateType = "PLATE_TYPE_TEMPORARY"
	PLATETYPE_PLATE_TYPE_MONTHLY   PlateType = "PLATE_TYPE_MONTHLY"
	PLATETYPE_PLATE_TYPE_FREE      PlateType = "PLATE_TYPE_FREE"
	PLATETYPE_PLATE_TYPE_PREPAID   PlateType = "PLATE_TYPE_PREPAID"
	PLATETYPE_PLATE_TYPE_OTHERS    PlateType = "PLATE_TYPE_OTHERS"
)

type FreePeriodChargingMode string

func (e FreePeriodChargingMode) Ptr() *FreePeriodChargingMode {
	return &e
}

const (
	FREEPERIODCHARGINGMODE_FREE_PERIOD_CHARGING_UNKNOWN                      FreePeriodChargingMode = "FREE_PERIOD_CHARGING_UNKNOWN"
	FREEPERIODCHARGINGMODE_FREE_PERIOD_CHARGING_ONCE_PER_ENTRY               FreePeriodChargingMode = "FREE_PERIOD_CHARGING_ONCE_PER_ENTRY"
	FREEPERIODCHARGINGMODE_FREE_PERIOD_CHARGING_ONCE_PER_24_HOURS            FreePeriodChargingMode = "FREE_PERIOD_CHARGING_ONCE_PER_24_HOURS"
	FREEPERIODCHARGINGMODE_FREE_PERIOD_CHARGING_ONCE_PER_CALENDAR_DAY        FreePeriodChargingMode = "FREE_PERIOD_CHARGING_ONCE_PER_CALENDAR_DAY"
	FREEPERIODCHARGINGMODE_FREE_PERIOD_CHARGING_CUMULATIVE_QUOTA_CALCULATION FreePeriodChargingMode = "FREE_PERIOD_CHARGING_CUMULATIVE_QUOTA_CALCULATION"
)

type FreePeriodCalculationMode string

func (e FreePeriodCalculationMode) Ptr() *FreePeriodCalculationMode {
	return &e
}

const (
	FREEPERIODCALCULATIONMODE_FREE_PERIOD_CAL_UNKNOWN          FreePeriodCalculationMode = "FREE_PERIOD_CAL_UNKNOWN"
	FREEPERIODCALCULATIONMODE_FREE_PERIOD_CAL_CONCURRENT_START FreePeriodCalculationMode = "FREE_PERIOD_CAL_CONCURRENT_START"
	FREEPERIODCALCULATIONMODE_FREE_PERIOD_CAL_SEQUENTIAL_START FreePeriodCalculationMode = "FREE_PERIOD_CAL_SEQUENTIAL_START"
)

type FirstDurationMode string

func (e FirstDurationMode) Ptr() *FirstDurationMode {
	return &e
}

const (
	FIRSTDURATIONMODE_FIRST_DURATION_MODE_UNKNOWN              FirstDurationMode = "FIRST_DURATION_MODE_UNKNOWN"
	FIRSTDURATIONMODE_FIRST_DURATION_MODE_ONLY_FIRST_DURATION  FirstDurationMode = "FIRST_DURATION_MODE_ONLY_FIRST_DURATION"
	FIRSTDURATIONMODE_FIRST_DURATION_MODE_EVERY_FIRST_DURATION FirstDurationMode = "FIRST_DURATION_MODE_EVERY_FIRST_DURATION"
)

type ChargeMode string

func (e ChargeMode) Ptr() *ChargeMode {
	return &e
}

const (
	CHARGEMODE_UNKNOWN  ChargeMode = "UNKNOWN"
	CHARGEMODE_INTERVAL ChargeMode = "INTERVAL"
	CHARGEMODE_ONE_TIME ChargeMode = "ONE_TIME"
)

```
