github.com/fastwego/offiaccount@v1.0.1/apis/invoice/example_invoice_test.go (about) 1 // Copyright 2020 FastWeGo 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package invoice_test 16 17 import ( 18 "fmt" 19 20 "github.com/fastwego/offiaccount" 21 "github.com/fastwego/offiaccount/apis/invoice" 22 ) 23 24 func ExampleGetAuthUrl() { 25 var ctx *offiaccount.OffiAccount 26 27 payload := []byte("{}") 28 resp, err := invoice.GetAuthUrl(ctx, payload) 29 30 fmt.Println(resp, err) 31 } 32 33 func ExampleGetAuthData() { 34 var ctx *offiaccount.OffiAccount 35 36 payload := []byte("{}") 37 resp, err := invoice.GetAuthData(ctx, payload) 38 39 fmt.Println(resp, err) 40 } 41 42 func ExampleRejectInsert() { 43 var ctx *offiaccount.OffiAccount 44 45 payload := []byte("{}") 46 resp, err := invoice.RejectInsert(ctx, payload) 47 48 fmt.Println(resp, err) 49 } 50 51 func ExampleMakeOutInvoice() { 52 var ctx *offiaccount.OffiAccount 53 54 payload := []byte("{}") 55 resp, err := invoice.MakeOutInvoice(ctx, payload) 56 57 fmt.Println(resp, err) 58 } 59 60 func ExampleClearOutInvoice() { 61 var ctx *offiaccount.OffiAccount 62 63 payload := []byte("{}") 64 resp, err := invoice.ClearOutInvoice(ctx, payload) 65 66 fmt.Println(resp, err) 67 } 68 69 func ExampleQueryInvoceInfo() { 70 var ctx *offiaccount.OffiAccount 71 72 payload := []byte("{}") 73 resp, err := invoice.QueryInvoceInfo(ctx, payload) 74 75 fmt.Println(resp, err) 76 } 77 78 func ExampleSetUrl() { 79 var ctx *offiaccount.OffiAccount 80 81 payload := []byte("{}") 82 resp, err := invoice.SetUrl(ctx, payload) 83 84 fmt.Println(resp, err) 85 } 86 87 func ExamplePlatformCreateCard() { 88 var ctx *offiaccount.OffiAccount 89 90 payload := []byte("{}") 91 resp, err := invoice.PlatformCreateCard(ctx, payload) 92 93 fmt.Println(resp, err) 94 } 95 96 func ExamplePlatformSetpdf() { 97 var ctx *offiaccount.OffiAccount 98 99 payload := []byte("{}") 100 resp, err := invoice.PlatformSetpdf(ctx, payload) 101 102 fmt.Println(resp, err) 103 } 104 105 func ExamplePlatformGetpdf() { 106 var ctx *offiaccount.OffiAccount 107 108 payload := []byte("{}") 109 resp, err := invoice.PlatformGetpdf(ctx, payload) 110 111 fmt.Println(resp, err) 112 } 113 114 func ExampleInsert() { 115 var ctx *offiaccount.OffiAccount 116 117 payload := []byte("{}") 118 resp, err := invoice.Insert(ctx, payload) 119 120 fmt.Println(resp, err) 121 } 122 123 func ExamplePlatformUpdateStatus() { 124 var ctx *offiaccount.OffiAccount 125 126 payload := []byte("{}") 127 resp, err := invoice.PlatformUpdateStatus(ctx, payload) 128 129 fmt.Println(resp, err) 130 } 131 132 func ExampleReimburseGetInvoiceInfo() { 133 var ctx *offiaccount.OffiAccount 134 135 payload := []byte("{}") 136 resp, err := invoice.ReimburseGetInvoiceInfo(ctx, payload) 137 138 fmt.Println(resp, err) 139 } 140 141 func ExampleReimburseGetInvoiceBatch() { 142 var ctx *offiaccount.OffiAccount 143 144 payload := []byte("{}") 145 resp, err := invoice.ReimburseGetInvoiceBatch(ctx, payload) 146 147 fmt.Println(resp, err) 148 } 149 150 func ExampleReimburseUpdateInvoiceStatus() { 151 var ctx *offiaccount.OffiAccount 152 153 payload := []byte("{}") 154 resp, err := invoice.ReimburseUpdateInvoiceStatus(ctx, payload) 155 156 fmt.Println(resp, err) 157 } 158 159 func ExampleReimburseUpdateStatusBatch() { 160 var ctx *offiaccount.OffiAccount 161 162 payload := []byte("{}") 163 resp, err := invoice.ReimburseUpdateStatusBatch(ctx, payload) 164 165 fmt.Println(resp, err) 166 } 167 168 func ExampleGetUserTitleUrl() { 169 var ctx *offiaccount.OffiAccount 170 171 payload := []byte("{}") 172 resp, err := invoice.GetUserTitleUrl(ctx, payload) 173 174 fmt.Println(resp, err) 175 } 176 177 func ExampleGetSelectTitleUrl() { 178 var ctx *offiaccount.OffiAccount 179 180 payload := []byte("{}") 181 resp, err := invoice.GetSelectTitleUrl(ctx, payload) 182 183 fmt.Println(resp, err) 184 } 185 186 func ExampleScanTitle() { 187 var ctx *offiaccount.OffiAccount 188 189 payload := []byte("{}") 190 resp, err := invoice.ScanTitle(ctx, payload) 191 192 fmt.Println(resp, err) 193 }