Repository navigation
Expand file tree
/
Copy pathmodel_cc_project_create_request.go
More file actions
404 lines (341 loc) · 18.4 KB
/
Copy pathmodel_cc_project_create_request.go
File metadata and controls
404 lines (341 loc) · 18.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
/*
The Blockchain API
# About Our vision is to make it super easy to interact with the decentralized web. We want you to be able to do this in any coding language and do it easily and quickly. You're a key part of our vision. We love feature requests! <a href=\"#section/Feature-Requests\">Make one!</a> # How to Use the API To use the API, you simply need to create an API key pair. Doing so takes less than a minute. Simply go to <a target=\"_blank\" href=\"https://dashboard.blockchainapi.com\">the dashboard</a>, create an account, and generate a key pair. You can now use this pair to make API requests. You must create your first pair via the dashboard. # Feature Requests Got a feature request? Submit it as an issue on <a target=\"_blank\" href=\"https://github.com/BL0CK-X/the-blockchain-api/issues/new/choose\">our GitHub repo</a> or [email us](mailto:info@blockchainapi.com). # Contact <figure> <img width=\"40px\" height=\"40px\" src=\"https://theblockchainapi-docs.s3.amazonaws.com/icons/phone.svg\" /> <figcaption style=\"textAlign:center;\">Text / Call: +1 (415) 888 4745 </figcaption> </figure> <a href=\"mailto:info@blockchainapi.com\" target=\"_blank\"> <figure> <img width=\"40px\" height=\"40px\" src=\"https://theblockchainapi-docs.s3.amazonaws.com/icons/email.svg\" /> <figcaption style=\"textAlign:center;\">Email us: info@blockchainapi.com</figcaption> </figure> </a> <a href=\"https://discord.gg/d49yzrZRAF\" target=\"_blank\"> <figure> <img width=\"40px\" height=\"40px\" src=\"https://theblockchainapi-docs.s3.amazonaws.com/icons/discord.svg\" /> <figcaption style=\"textAlign:center;\">Join our Discord</figcaption> </figure> </a> <a href=\"https://twitter.com/BlockchainAP1\" target=\"_blank\"> <figure> <img width=\"40px\" height=\"40px\" src=\"https://theblockchainapi-docs.s3.amazonaws.com/icons/twitter.svg\" /> <figcaption style=\"textAlign:center;\">Follow us on Twitter</figcaption> </figure> </a> <a href=\"https://github.com/BL0CK-X/the-blockchain-api\" target=\"_blank\"> <figure> <img width=\"40px\" height=\"40px\" src=\"https://theblockchainapi-docs.s3.amazonaws.com/icons/github.svg\" /> <figcaption style=\"textAlign:center;\">Star us on Github</figcaption> </figure> </a> # Security Common dogma is to never give out your seed phrase. We agree. It's a matter of security, and anyone who has your seed phrase can irreversibly empty your wallet. <b>When using an API endpoint that requires a seed phrase, we highly recommend that users use or create a wallet that they do not use as their primary wallet.</b> How you make this work depends on what you're doing. If you're minting an NFT for example, we recommend creating a new wallet and then transferring just enough SOL to that wallet to mint the NFT. This is possible on Solana because such transactions cost less than a penny. We will have more tutorials in the future that make it easier for you to be secure when using our API. We have easy-to-use endpoints for <a href=\"#tag/Solana-Wallet/paths/~1solana~1wallet~1secret_recovery_phrase/post\">creating a new seed phrase</a> and then <a href=\"#tag/Solana-Wallet/paths/~1solana~1wallet~1public_key/post\">deriving a public key</a> to enable you to transfer to that new wallet. Let's have a constructive dialog about this. Feel free to <a href=\"#section/Contact\">contact us</a>. I made a video discussing this matter <a target=\"_blank\" href=\"https://youtu.be/m9unUb8Z9qU\">here</a>. Note: We have had a couple of individuals harrass and threaten us. These individuals did <b>not</b> try our API or speak to anyone who has used it. They simply saw that we require a seed phrase for certain endpoints and figured that the proper response was to attack us. (I explain why we do <a target=\"_blank\" href=\"https://youtu.be/m9unUb8Z9qU\">here</a>.) Such harrassment and threats are not only harmful, but they are also illegal, and we will report offenders. Do not harrass us. Rather, feel free to discuss your concerns with us and we will be more than happy to work with you to come up with a solution. # Pricing <b>Each user receives 50,000 free credits each month.</b> Each endpoint costs a certain amount credits. Scroll below to any endpoint (i.e., function) to see how much each endpoint costs. (Or CMD+F `Cost: 0 Credit`, for example) You can learn more about our pricing <a href=\"https://dashboard.blockchainapi.com/billing\" target=\"_blank\">here</a>. We frequently do custom plans. If our pricing doesn't work for you, <a href=\"#section/Contact\">contact us</a>. If you have questions, concerns, feedback, or ideas, <a href=\"#section/Contact\">contact us</a>. # SDKs / API Wrappers We have examples using both our <a href=\"https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples\" target=\"_blank\">Python wrapper and our JavaScript wrapper here</a>. We have built a custom <a href=\"https://github.com/BL0CK-X/the-blockchain-api-python-wrapper\" target=\"_blank\">Python wrapper</a>. `pip install theblockchainapi` We also have published a <a href=\"https://github.com/BL0CK-X/theblockchainapi-javascript-wrapper\" target=\"_blank\">JavaScript Wrapper</a>. `npm install theblockchainapi` We also have auto-generated wrappers for the following languages: - <a href=\"https://github.com/BL0CK-X/theblockchainapi-go-wrapper\" target = \"_blank\">Go</a> - <a href=\"https://github.com/BL0CK-X/theblockchainapi-java-wrapper\" target = \"_blank\">Java</a> - <a href=\"https://github.com/BL0CK-X/theblockchainapi-kotlin-wrapper\" target = \"_blank\">Kotlin</a> - <a href=\"https://github.com/BL0CK-X/theblockchainapi-php-wrapper\" target = \"_blank\">PHP</a> - <a href=\"https://github.com/BL0CK-X/theblockchainapi-swift-wrapper\" target = \"_blank\">Swift5</a> - <a href=\"https://github.com/BL0CK-X/theblockchainapi-typescript-wrapper\" target = \"_blank\">TypeScript</a> - <a href=\"https://github.com/BL0CK-X/theblockchainapi-csharp-wrapper\" target = \"_blank\">C#</a> - <a href=\"https://github.com/BL0CK-X/theblockchainapi-dart-wrapper\" target = \"_blank\">Dart</a> If you would like a different language as well, submit an issue <a href=\"https://github.com/BL0CK-X/theblockchainapi-wrappers/issues/new\" target=\"_blank\">here</a>. If you run into any bugs with the wrappers, submit an issue <a href=\"https://github.com/BL0CK-X/theblockchainapi-wrappers/issues/new\" target=\"_blank\">here</a>.
API version: null
Contact: info@blockchainapi.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// CCProjectCreateRequest You can change any of these parameters after creating the project. None of these parameters are required.
type CCProjectCreateRequest struct {
// The name of the project. This is shown to your users and should identify your company or organization.
Name string `json:"name"`
// The description of your project / company.
Description *string `json:"description,omitempty"`
// A URL that identifies where we should make an API request to notify you of a new payment (e.g., api.myproject.com/crypto_payments/webhook). Learn more [here](#tag/CC-Webhook/operation/getCCWebhook).
Webhook *string `json:"webhook,omitempty"`
// The website of your project / company.
Website *string `json:"website,omitempty"`
// A Discord webhook. We will send a message to this channel to notify of payment. Learn more [here]().
DiscordWebhook *string `json:"discord_webhook,omitempty"`
// A URL of your logo.
LogoUrl *string `json:"logo_url,omitempty"`
CustomerIdToCollect *CCProjectCreateRequestCustomerIdToCollect `json:"customer_id_to_collect,omitempty"`
// Where to redirect customers after payment. If not supplied, customers will be redirected to checkout.blockchainapi.com/me to view their subscriptions.
SuccessUrl *string `json:"success_url,omitempty"`
PayoutMethod *CCProjectCreateRequestPayoutMethod `json:"payout_method,omitempty"`
}
// NewCCProjectCreateRequest instantiates a new CCProjectCreateRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCCProjectCreateRequest(name string) *CCProjectCreateRequest {
this := CCProjectCreateRequest{}
this.Name = name
return &this
}
// NewCCProjectCreateRequestWithDefaults instantiates a new CCProjectCreateRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCCProjectCreateRequestWithDefaults() *CCProjectCreateRequest {
this := CCProjectCreateRequest{}
return &this
}
// GetName returns the Name field value
func (o *CCProjectCreateRequest) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *CCProjectCreateRequest) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *CCProjectCreateRequest) SetName(v string) {
o.Name = v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *CCProjectCreateRequest) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CCProjectCreateRequest) GetDescriptionOk() (*string, bool) {
if o == nil || o.Description == nil {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *CCProjectCreateRequest) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CCProjectCreateRequest) SetDescription(v string) {
o.Description = &v
}
// GetWebhook returns the Webhook field value if set, zero value otherwise.
func (o *CCProjectCreateRequest) GetWebhook() string {
if o == nil || o.Webhook == nil {
var ret string
return ret
}
return *o.Webhook
}
// GetWebhookOk returns a tuple with the Webhook field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CCProjectCreateRequest) GetWebhookOk() (*string, bool) {
if o == nil || o.Webhook == nil {
return nil, false
}
return o.Webhook, true
}
// HasWebhook returns a boolean if a field has been set.
func (o *CCProjectCreateRequest) HasWebhook() bool {
if o != nil && o.Webhook != nil {
return true
}
return false
}
// SetWebhook gets a reference to the given string and assigns it to the Webhook field.
func (o *CCProjectCreateRequest) SetWebhook(v string) {
o.Webhook = &v
}
// GetWebsite returns the Website field value if set, zero value otherwise.
func (o *CCProjectCreateRequest) GetWebsite() string {
if o == nil || o.Website == nil {
var ret string
return ret
}
return *o.Website
}
// GetWebsiteOk returns a tuple with the Website field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CCProjectCreateRequest) GetWebsiteOk() (*string, bool) {
if o == nil || o.Website == nil {
return nil, false
}
return o.Website, true
}
// HasWebsite returns a boolean if a field has been set.
func (o *CCProjectCreateRequest) HasWebsite() bool {
if o != nil && o.Website != nil {
return true
}
return false
}
// SetWebsite gets a reference to the given string and assigns it to the Website field.
func (o *CCProjectCreateRequest) SetWebsite(v string) {
o.Website = &v
}
// GetDiscordWebhook returns the DiscordWebhook field value if set, zero value otherwise.
func (o *CCProjectCreateRequest) GetDiscordWebhook() string {
if o == nil || o.DiscordWebhook == nil {
var ret string
return ret
}
return *o.DiscordWebhook
}
// GetDiscordWebhookOk returns a tuple with the DiscordWebhook field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CCProjectCreateRequest) GetDiscordWebhookOk() (*string, bool) {
if o == nil || o.DiscordWebhook == nil {
return nil, false
}
return o.DiscordWebhook, true
}
// HasDiscordWebhook returns a boolean if a field has been set.
func (o *CCProjectCreateRequest) HasDiscordWebhook() bool {
if o != nil && o.DiscordWebhook != nil {
return true
}
return false
}
// SetDiscordWebhook gets a reference to the given string and assigns it to the DiscordWebhook field.
func (o *CCProjectCreateRequest) SetDiscordWebhook(v string) {
o.DiscordWebhook = &v
}
// GetLogoUrl returns the LogoUrl field value if set, zero value otherwise.
func (o *CCProjectCreateRequest) GetLogoUrl() string {
if o == nil || o.LogoUrl == nil {
var ret string
return ret
}
return *o.LogoUrl
}
// GetLogoUrlOk returns a tuple with the LogoUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CCProjectCreateRequest) GetLogoUrlOk() (*string, bool) {
if o == nil || o.LogoUrl == nil {
return nil, false
}
return o.LogoUrl, true
}
// HasLogoUrl returns a boolean if a field has been set.
func (o *CCProjectCreateRequest) HasLogoUrl() bool {
if o != nil && o.LogoUrl != nil {
return true
}
return false
}
// SetLogoUrl gets a reference to the given string and assigns it to the LogoUrl field.
func (o *CCProjectCreateRequest) SetLogoUrl(v string) {
o.LogoUrl = &v
}
// GetCustomerIdToCollect returns the CustomerIdToCollect field value if set, zero value otherwise.
func (o *CCProjectCreateRequest) GetCustomerIdToCollect() CCProjectCreateRequestCustomerIdToCollect {
if o == nil || o.CustomerIdToCollect == nil {
var ret CCProjectCreateRequestCustomerIdToCollect
return ret
}
return *o.CustomerIdToCollect
}
// GetCustomerIdToCollectOk returns a tuple with the CustomerIdToCollect field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CCProjectCreateRequest) GetCustomerIdToCollectOk() (*CCProjectCreateRequestCustomerIdToCollect, bool) {
if o == nil || o.CustomerIdToCollect == nil {
return nil, false
}
return o.CustomerIdToCollect, true
}
// HasCustomerIdToCollect returns a boolean if a field has been set.
func (o *CCProjectCreateRequest) HasCustomerIdToCollect() bool {
if o != nil && o.CustomerIdToCollect != nil {
return true
}
return false
}
// SetCustomerIdToCollect gets a reference to the given CCProjectCreateRequestCustomerIdToCollect and assigns it to the CustomerIdToCollect field.
func (o *CCProjectCreateRequest) SetCustomerIdToCollect(v CCProjectCreateRequestCustomerIdToCollect) {
o.CustomerIdToCollect = &v
}
// GetSuccessUrl returns the SuccessUrl field value if set, zero value otherwise.
func (o *CCProjectCreateRequest) GetSuccessUrl() string {
if o == nil || o.SuccessUrl == nil {
var ret string
return ret
}
return *o.SuccessUrl
}
// GetSuccessUrlOk returns a tuple with the SuccessUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CCProjectCreateRequest) GetSuccessUrlOk() (*string, bool) {
if o == nil || o.SuccessUrl == nil {
return nil, false
}
return o.SuccessUrl, true
}
// HasSuccessUrl returns a boolean if a field has been set.
func (o *CCProjectCreateRequest) HasSuccessUrl() bool {
if o != nil && o.SuccessUrl != nil {
return true
}
return false
}
// SetSuccessUrl gets a reference to the given string and assigns it to the SuccessUrl field.
func (o *CCProjectCreateRequest) SetSuccessUrl(v string) {
o.SuccessUrl = &v
}
// GetPayoutMethod returns the PayoutMethod field value if set, zero value otherwise.
func (o *CCProjectCreateRequest) GetPayoutMethod() CCProjectCreateRequestPayoutMethod {
if o == nil || o.PayoutMethod == nil {
var ret CCProjectCreateRequestPayoutMethod
return ret
}
return *o.PayoutMethod
}
// GetPayoutMethodOk returns a tuple with the PayoutMethod field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CCProjectCreateRequest) GetPayoutMethodOk() (*CCProjectCreateRequestPayoutMethod, bool) {
if o == nil || o.PayoutMethod == nil {
return nil, false
}
return o.PayoutMethod, true
}
// HasPayoutMethod returns a boolean if a field has been set.
func (o *CCProjectCreateRequest) HasPayoutMethod() bool {
if o != nil && o.PayoutMethod != nil {
return true
}
return false
}
// SetPayoutMethod gets a reference to the given CCProjectCreateRequestPayoutMethod and assigns it to the PayoutMethod field.
func (o *CCProjectCreateRequest) SetPayoutMethod(v CCProjectCreateRequestPayoutMethod) {
o.PayoutMethod = &v
}
func (o CCProjectCreateRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["name"] = o.Name
}
if o.Description != nil {
toSerialize["description"] = o.Description
}
if o.Webhook != nil {
toSerialize["webhook"] = o.Webhook
}
if o.Website != nil {
toSerialize["website"] = o.Website
}
if o.DiscordWebhook != nil {
toSerialize["discord_webhook"] = o.DiscordWebhook
}
if o.LogoUrl != nil {
toSerialize["logo_url"] = o.LogoUrl
}
if o.CustomerIdToCollect != nil {
toSerialize["customer_id_to_collect"] = o.CustomerIdToCollect
}
if o.SuccessUrl != nil {
toSerialize["success_url"] = o.SuccessUrl
}
if o.PayoutMethod != nil {
toSerialize["payout_method"] = o.PayoutMethod
}
return json.Marshal(toSerialize)
}
type NullableCCProjectCreateRequest struct {
value *CCProjectCreateRequest
isSet bool
}
func (v NullableCCProjectCreateRequest) Get() *CCProjectCreateRequest {
return v.value
}
func (v *NullableCCProjectCreateRequest) Set(val *CCProjectCreateRequest) {
v.value = val
v.isSet = true
}
func (v NullableCCProjectCreateRequest) IsSet() bool {
return v.isSet
}
func (v *NullableCCProjectCreateRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCCProjectCreateRequest(val *CCProjectCreateRequest) *NullableCCProjectCreateRequest {
return &NullableCCProjectCreateRequest{value: val, isSet: true}
}
func (v NullableCCProjectCreateRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCCProjectCreateRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}