| 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 |
package paymentsresellersubscription |
| 52 |
|
| 53 |
import ( |
| 54 |
"bytes" |
| 55 |
"context" |
| 56 |
"encoding/json" |
| 57 |
"errors" |
| 58 |
"fmt" |
| 59 |
"io" |
| 60 |
"log/slog" |
| 61 |
"net/http" |
| 62 |
"net/url" |
| 63 |
"strconv" |
| 64 |
"strings" |
| 65 |
|
| 66 |
"github.com/googleapis/gax-go/v2/internallog" |
| 67 |
googleapi "google.golang.org/api/googleapi" |
| 68 |
internal "google.golang.org/api/internal" |
| 69 |
gensupport "google.golang.org/api/internal/gensupport" |
| 70 |
option "google.golang.org/api/option" |
| 71 |
internaloption "google.golang.org/api/option/internaloption" |
| 72 |
htransport "google.golang.org/api/transport/http" |
| 73 |
) |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
var _ = bytes.NewBuffer |
| 78 |
var _ = strconv.Itoa |
| 79 |
var _ = fmt.Sprintf |
| 80 |
var _ = json.NewDecoder |
| 81 |
var _ = io.Copy |
| 82 |
var _ = url.Parse |
| 83 |
var _ = gensupport.MarshalJSON |
| 84 |
var _ = googleapi.Version |
| 85 |
var _ = errors.New |
| 86 |
var _ = strings.Replace |
| 87 |
var _ = context.Canceled |
| 88 |
var _ = internaloption.WithDefaultEndpoint |
| 89 |
var _ = internal.Version |
| 90 |
var _ = internallog.New |
| 91 |
|
| 92 |
const apiId = "paymentsresellersubscription:v1" |
| 93 |
const apiName = "paymentsresellersubscription" |
| 94 |
const apiVersion = "v1" |
| 95 |
const basePath = "https://paymentsresellersubscription.googleapis.com/" |
| 96 |
const basePathTemplate = "https://paymentsresellersubscription.UNIVERSE_DOMAIN/" |
| 97 |
const mtlsBasePath = "https://paymentsresellersubscription.mtls.googleapis.com/" |
| 98 |
|
| 99 |
|
| 100 |
const ( |
| 101 |
|
| 102 |
SdmServiceScope = "https://www.googleapis.com/auth/sdm.service" |
| 103 |
) |
| 104 |
|
| 105 |
|
| 106 |
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { |
| 107 |
scopesOption := internaloption.WithDefaultScopes( |
| 108 |
"https://www.googleapis.com/auth/sdm.service", |
| 109 |
) |
| 110 |
|
| 111 |
opts = append([]option.ClientOption{scopesOption}, opts...) |
| 112 |
opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) |
| 113 |
opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) |
| 114 |
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) |
| 115 |
opts = append(opts, internaloption.EnableNewAuthLibrary()) |
| 116 |
client, endpoint, err := htransport.NewClient(ctx, opts...) |
| 117 |
if err != nil { |
| 118 |
return nil, err |
| 119 |
} |
| 120 |
s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} |
| 121 |
s.Partners = NewPartnersService(s) |
| 122 |
if endpoint != "" { |
| 123 |
s.BasePath = endpoint |
| 124 |
} |
| 125 |
return s, nil |
| 126 |
} |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
func New(client *http.Client) (*Service, error) { |
| 134 |
if client == nil { |
| 135 |
return nil, errors.New("client is nil") |
| 136 |
} |
| 137 |
return NewService(context.TODO(), option.WithHTTPClient(client)) |
| 138 |
} |
| 139 |
|
| 140 |
type Service struct { |
| 141 |
client *http.Client |
| 142 |
logger *slog.Logger |
| 143 |
BasePath string |
| 144 |
UserAgent string |
| 145 |
|
| 146 |
Partners *PartnersService |
| 147 |
} |
| 148 |
|
| 149 |
func (s *Service) userAgent() string { |
| 150 |
if s.UserAgent == "" { |
| 151 |
return googleapi.UserAgent |
| 152 |
} |
| 153 |
return googleapi.UserAgent + " " + s.UserAgent |
| 154 |
} |
| 155 |
|
| 156 |
func NewPartnersService(s *Service) *PartnersService { |
| 157 |
rs := &PartnersService{s: s} |
| 158 |
rs.Products = NewPartnersProductsService(s) |
| 159 |
rs.Promotions = NewPartnersPromotionsService(s) |
| 160 |
rs.Subscriptions = NewPartnersSubscriptionsService(s) |
| 161 |
rs.UserSessions = NewPartnersUserSessionsService(s) |
| 162 |
return rs |
| 163 |
} |
| 164 |
|
| 165 |
type PartnersService struct { |
| 166 |
s *Service |
| 167 |
|
| 168 |
Products *PartnersProductsService |
| 169 |
|
| 170 |
Promotions *PartnersPromotionsService |
| 171 |
|
| 172 |
Subscriptions *PartnersSubscriptionsService |
| 173 |
|
| 174 |
UserSessions *PartnersUserSessionsService |
| 175 |
} |
| 176 |
|
| 177 |
func NewPartnersProductsService(s *Service) *PartnersProductsService { |
| 178 |
rs := &PartnersProductsService{s: s} |
| 179 |
return rs |
| 180 |
} |
| 181 |
|
| 182 |
type PartnersProductsService struct { |
| 183 |
s *Service |
| 184 |
} |
| 185 |
|
| 186 |
func NewPartnersPromotionsService(s *Service) *PartnersPromotionsService { |
| 187 |
rs := &PartnersPromotionsService{s: s} |
| 188 |
return rs |
| 189 |
} |
| 190 |
|
| 191 |
type PartnersPromotionsService struct { |
| 192 |
s *Service |
| 193 |
} |
| 194 |
|
| 195 |
func NewPartnersSubscriptionsService(s *Service) *PartnersSubscriptionsService { |
| 196 |
rs := &PartnersSubscriptionsService{s: s} |
| 197 |
rs.LineItems = NewPartnersSubscriptionsLineItemsService(s) |
| 198 |
return rs |
| 199 |
} |
| 200 |
|
| 201 |
type PartnersSubscriptionsService struct { |
| 202 |
s *Service |
| 203 |
|
| 204 |
LineItems *PartnersSubscriptionsLineItemsService |
| 205 |
} |
| 206 |
|
| 207 |
func NewPartnersSubscriptionsLineItemsService(s *Service) *PartnersSubscriptionsLineItemsService { |
| 208 |
rs := &PartnersSubscriptionsLineItemsService{s: s} |
| 209 |
return rs |
| 210 |
} |
| 211 |
|
| 212 |
type PartnersSubscriptionsLineItemsService struct { |
| 213 |
s *Service |
| 214 |
} |
| 215 |
|
| 216 |
func NewPartnersUserSessionsService(s *Service) *PartnersUserSessionsService { |
| 217 |
rs := &PartnersUserSessionsService{s: s} |
| 218 |
return rs |
| 219 |
} |
| 220 |
|
| 221 |
type PartnersUserSessionsService struct { |
| 222 |
s *Service |
| 223 |
} |
| 224 |
|
| 225 |
|
| 226 |
type Amount struct { |
| 227 |
|
| 228 |
|
| 229 |
AmountMicros int64 `json:"amountMicros,omitempty,string"` |
| 230 |
|
| 231 |
|
| 232 |
CurrencyCode string `json:"currencyCode,omitempty"` |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
ForceSendFields []string `json:"-"` |
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
NullFields []string `json:"-"` |
| 244 |
} |
| 245 |
|
| 246 |
func (s Amount) MarshalJSON() ([]byte, error) { |
| 247 |
type NoMethod Amount |
| 248 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 249 |
} |
| 250 |
|
| 251 |
|
| 252 |
type CancelSubscriptionRequest struct { |
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
CancelImmediately bool `json:"cancelImmediately,omitempty"` |
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
CancellationReason string `json:"cancellationReason,omitempty"` |
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
ForceSendFields []string `json:"-"` |
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
NullFields []string `json:"-"` |
| 295 |
} |
| 296 |
|
| 297 |
func (s CancelSubscriptionRequest) MarshalJSON() ([]byte, error) { |
| 298 |
type NoMethod CancelSubscriptionRequest |
| 299 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 300 |
} |
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
type CancelSubscriptionResponse struct { |
| 305 |
|
| 306 |
Subscription *Subscription `json:"subscription,omitempty"` |
| 307 |
|
| 308 |
|
| 309 |
googleapi.ServerResponse `json:"-"` |
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
ForceSendFields []string `json:"-"` |
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
NullFields []string `json:"-"` |
| 321 |
} |
| 322 |
|
| 323 |
func (s CancelSubscriptionResponse) MarshalJSON() ([]byte, error) { |
| 324 |
type NoMethod CancelSubscriptionResponse |
| 325 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 326 |
} |
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
type CreateSubscriptionIntent struct { |
| 331 |
|
| 332 |
CycleOptions *CycleOptions `json:"cycleOptions,omitempty"` |
| 333 |
|
| 334 |
|
| 335 |
Parent string `json:"parent,omitempty"` |
| 336 |
|
| 337 |
Subscription *Subscription `json:"subscription,omitempty"` |
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
SubscriptionId string `json:"subscriptionId,omitempty"` |
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
ForceSendFields []string `json:"-"` |
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
NullFields []string `json:"-"` |
| 354 |
} |
| 355 |
|
| 356 |
func (s CreateSubscriptionIntent) MarshalJSON() ([]byte, error) { |
| 357 |
type NoMethod CreateSubscriptionIntent |
| 358 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 359 |
} |
| 360 |
|
| 361 |
|
| 362 |
type CycleOptions struct { |
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
InitialCycleDuration *Duration `json:"initialCycleDuration,omitempty"` |
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
ForceSendFields []string `json:"-"` |
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
NullFields []string `json:"-"` |
| 381 |
} |
| 382 |
|
| 383 |
func (s CycleOptions) MarshalJSON() ([]byte, error) { |
| 384 |
type NoMethod CycleOptions |
| 385 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 386 |
} |
| 387 |
|
| 388 |
|
| 389 |
type Duration struct { |
| 390 |
|
| 391 |
Count int64 `json:"count,omitempty"` |
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
Unit string `json:"unit,omitempty"` |
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
ForceSendFields []string `json:"-"` |
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
NullFields []string `json:"-"` |
| 412 |
} |
| 413 |
|
| 414 |
func (s Duration) MarshalJSON() ([]byte, error) { |
| 415 |
type NoMethod Duration |
| 416 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 417 |
} |
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
type EntitleSubscriptionIntent struct { |
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
Name string `json:"name,omitempty"` |
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
ForceSendFields []string `json:"-"` |
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
NullFields []string `json:"-"` |
| 437 |
} |
| 438 |
|
| 439 |
func (s EntitleSubscriptionIntent) MarshalJSON() ([]byte, error) { |
| 440 |
type NoMethod EntitleSubscriptionIntent |
| 441 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 442 |
} |
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
type EntitleSubscriptionRequest struct { |
| 448 |
|
| 449 |
|
| 450 |
LineItemEntitlementDetails []*EntitleSubscriptionRequestLineItemEntitlementDetails `json:"lineItemEntitlementDetails,omitempty"` |
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
ForceSendFields []string `json:"-"` |
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
NullFields []string `json:"-"` |
| 462 |
} |
| 463 |
|
| 464 |
func (s EntitleSubscriptionRequest) MarshalJSON() ([]byte, error) { |
| 465 |
type NoMethod EntitleSubscriptionRequest |
| 466 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 467 |
} |
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
type EntitleSubscriptionRequestLineItemEntitlementDetails struct { |
| 472 |
|
| 473 |
LineItemIndex int64 `json:"lineItemIndex,omitempty"` |
| 474 |
|
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
Products []string `json:"products,omitempty"` |
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
ForceSendFields []string `json:"-"` |
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
NullFields []string `json:"-"` |
| 490 |
} |
| 491 |
|
| 492 |
func (s EntitleSubscriptionRequestLineItemEntitlementDetails) MarshalJSON() ([]byte, error) { |
| 493 |
type NoMethod EntitleSubscriptionRequestLineItemEntitlementDetails |
| 494 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 495 |
} |
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
type EntitleSubscriptionResponse struct { |
| 500 |
|
| 501 |
Subscription *Subscription `json:"subscription,omitempty"` |
| 502 |
|
| 503 |
|
| 504 |
googleapi.ServerResponse `json:"-"` |
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
|
| 510 |
ForceSendFields []string `json:"-"` |
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
NullFields []string `json:"-"` |
| 516 |
} |
| 517 |
|
| 518 |
func (s EntitleSubscriptionResponse) MarshalJSON() ([]byte, error) { |
| 519 |
type NoMethod EntitleSubscriptionResponse |
| 520 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 521 |
} |
| 522 |
|
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
type ExtendSubscriptionRequest struct { |
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
Extension *Extension `json:"extension,omitempty"` |
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
RequestId string `json:"requestId,omitempty"` |
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
|
| 542 |
ForceSendFields []string `json:"-"` |
| 543 |
|
| 544 |
|
| 545 |
|
| 546 |
|
| 547 |
NullFields []string `json:"-"` |
| 548 |
} |
| 549 |
|
| 550 |
func (s ExtendSubscriptionRequest) MarshalJSON() ([]byte, error) { |
| 551 |
type NoMethod ExtendSubscriptionRequest |
| 552 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 553 |
} |
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
type ExtendSubscriptionResponse struct { |
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
CycleEndTime string `json:"cycleEndTime,omitempty"` |
| 562 |
|
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
FreeTrialEndTime string `json:"freeTrialEndTime,omitempty"` |
| 567 |
|
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
|
| 573 |
RenewalTime string `json:"renewalTime,omitempty"` |
| 574 |
|
| 575 |
|
| 576 |
googleapi.ServerResponse `json:"-"` |
| 577 |
|
| 578 |
|
| 579 |
|
| 580 |
|
| 581 |
|
| 582 |
ForceSendFields []string `json:"-"` |
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
NullFields []string `json:"-"` |
| 588 |
} |
| 589 |
|
| 590 |
func (s ExtendSubscriptionResponse) MarshalJSON() ([]byte, error) { |
| 591 |
type NoMethod ExtendSubscriptionResponse |
| 592 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 593 |
} |
| 594 |
|
| 595 |
|
| 596 |
type Extension struct { |
| 597 |
|
| 598 |
|
| 599 |
Duration *Duration `json:"duration,omitempty"` |
| 600 |
’s |
| 601 |
|
| 602 |
PartnerUserToken string `json:"partnerUserToken,omitempty"` |
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
ForceSendFields []string `json:"-"` |
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
NullFields []string `json:"-"` |
| 614 |
} |
| 615 |
|
| 616 |
func (s Extension) MarshalJSON() ([]byte, error) { |
| 617 |
type NoMethod Extension |
| 618 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 619 |
} |
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
type FindEligiblePromotionsRequest struct { |
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
|
| 632 |
|
| 633 |
|
| 634 |
|
| 635 |
Filter string `json:"filter,omitempty"` |
| 636 |
|
| 637 |
|
| 638 |
|
| 639 |
|
| 640 |
PageSize int64 `json:"pageSize,omitempty"` |
| 641 |
|
| 642 |
|
| 643 |
|
| 644 |
|
| 645 |
PageToken string `json:"pageToken,omitempty"` |
| 646 |
|
| 647 |
|
| 648 |
|
| 649 |
|
| 650 |
|
| 651 |
ForceSendFields []string `json:"-"` |
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
|
| 656 |
NullFields []string `json:"-"` |
| 657 |
} |
| 658 |
|
| 659 |
func (s FindEligiblePromotionsRequest) MarshalJSON() ([]byte, error) { |
| 660 |
type NoMethod FindEligiblePromotionsRequest |
| 661 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 662 |
} |
| 663 |
|
| 664 |
|
| 665 |
|
| 666 |
type FindEligiblePromotionsResponse struct { |
| 667 |
|
| 668 |
|
| 669 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 670 |
|
| 671 |
Promotions []*Promotion `json:"promotions,omitempty"` |
| 672 |
|
| 673 |
|
| 674 |
googleapi.ServerResponse `json:"-"` |
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
|
| 679 |
|
| 680 |
ForceSendFields []string `json:"-"` |
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
NullFields []string `json:"-"` |
| 686 |
} |
| 687 |
|
| 688 |
func (s FindEligiblePromotionsResponse) MarshalJSON() ([]byte, error) { |
| 689 |
type NoMethod FindEligiblePromotionsResponse |
| 690 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 691 |
} |
| 692 |
|
| 693 |
|
| 694 |
|
| 695 |
type FiniteBillingCycleDetails struct { |
| 696 |
|
| 697 |
|
| 698 |
BillingCycleCountLimit int64 `json:"billingCycleCountLimit,omitempty,string"` |
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
|
| 704 |
ForceSendFields []string `json:"-"` |
| 705 |
|
| 706 |
|
| 707 |
|
| 708 |
|
| 709 |
NullFields []string `json:"-"` |
| 710 |
} |
| 711 |
|
| 712 |
func (s FiniteBillingCycleDetails) MarshalJSON() ([]byte, error) { |
| 713 |
type NoMethod FiniteBillingCycleDetails |
| 714 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 715 |
} |
| 716 |
|
| 717 |
|
| 718 |
type GenerateUserSessionRequest struct { |
| 719 |
|
| 720 |
IntentPayload *IntentPayload `json:"intentPayload,omitempty"` |
| 721 |
|
| 722 |
|
| 723 |
|
| 724 |
|
| 725 |
|
| 726 |
ForceSendFields []string `json:"-"` |
| 727 |
|
| 728 |
|
| 729 |
|
| 730 |
|
| 731 |
NullFields []string `json:"-"` |
| 732 |
} |
| 733 |
|
| 734 |
func (s GenerateUserSessionRequest) MarshalJSON() ([]byte, error) { |
| 735 |
type NoMethod GenerateUserSessionRequest |
| 736 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 737 |
} |
| 738 |
|
| 739 |
|
| 740 |
|
| 741 |
type GenerateUserSessionResponse struct { |
| 742 |
|
| 743 |
|
| 744 |
UserSession *UserSession `json:"userSession,omitempty"` |
| 745 |
|
| 746 |
|
| 747 |
googleapi.ServerResponse `json:"-"` |
| 748 |
|
| 749 |
|
| 750 |
|
| 751 |
|
| 752 |
|
| 753 |
ForceSendFields []string `json:"-"` |
| 754 |
|
| 755 |
|
| 756 |
|
| 757 |
|
| 758 |
NullFields []string `json:"-"` |
| 759 |
} |
| 760 |
|
| 761 |
func (s GenerateUserSessionResponse) MarshalJSON() ([]byte, error) { |
| 762 |
type NoMethod GenerateUserSessionResponse |
| 763 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 764 |
} |
| 765 |
|
| 766 |
|
| 767 |
type GoogleHomePayload struct { |
| 768 |
|
| 769 |
|
| 770 |
AttachedToGoogleStructure bool `json:"attachedToGoogleStructure,omitempty"` |
| 771 |
|
| 772 |
GoogleStructureId string `json:"googleStructureId,omitempty"` |
| 773 |
|
| 774 |
|
| 775 |
|
| 776 |
PartnerStructureId string `json:"partnerStructureId,omitempty"` |
| 777 |
|
| 778 |
|
| 779 |
|
| 780 |
|
| 781 |
|
| 782 |
ForceSendFields []string `json:"-"` |
| 783 |
|
| 784 |
|
| 785 |
|
| 786 |
|
| 787 |
NullFields []string `json:"-"` |
| 788 |
} |
| 789 |
|
| 790 |
func (s GoogleHomePayload) MarshalJSON() ([]byte, error) { |
| 791 |
type NoMethod GoogleHomePayload |
| 792 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 793 |
} |
| 794 |
|
| 795 |
|
| 796 |
type GoogleOnePayload struct { |
| 797 |
|
| 798 |
Campaigns []string `json:"campaigns,omitempty"` |
| 799 |
|
| 800 |
|
| 801 |
|
| 802 |
|
| 803 |
|
| 804 |
|
| 805 |
|
| 806 |
|
| 807 |
|
| 808 |
|
| 809 |
|
| 810 |
|
| 811 |
|
| 812 |
|
| 813 |
|
| 814 |
|
| 815 |
Offering string `json:"offering,omitempty"` |
| 816 |
|
| 817 |
|
| 818 |
|
| 819 |
|
| 820 |
|
| 821 |
|
| 822 |
|
| 823 |
|
| 824 |
|
| 825 |
SalesChannel string `json:"salesChannel,omitempty"` |
| 826 |
|
| 827 |
|
| 828 |
StoreId string `json:"storeId,omitempty"` |
| 829 |
|
| 830 |
|
| 831 |
|
| 832 |
|
| 833 |
|
| 834 |
ForceSendFields []string `json:"-"` |
| 835 |
|
| 836 |
|
| 837 |
|
| 838 |
|
| 839 |
NullFields []string `json:"-"` |
| 840 |
} |
| 841 |
|
| 842 |
func (s GoogleOnePayload) MarshalJSON() ([]byte, error) { |
| 843 |
type NoMethod GoogleOnePayload |
| 844 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 845 |
} |
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
type GoogleTypeLocalizedText struct { |
| 850 |
|
| 851 |
|
| 852 |
|
| 853 |
LanguageCode string `json:"languageCode,omitempty"` |
| 854 |
|
| 855 |
Text string `json:"text,omitempty"` |
| 856 |
|
| 857 |
|
| 858 |
|
| 859 |
|
| 860 |
|
| 861 |
ForceSendFields []string `json:"-"` |
| 862 |
|
| 863 |
|
| 864 |
|
| 865 |
|
| 866 |
NullFields []string `json:"-"` |
| 867 |
} |
| 868 |
|
| 869 |
func (s GoogleTypeLocalizedText) MarshalJSON() ([]byte, error) { |
| 870 |
type NoMethod GoogleTypeLocalizedText |
| 871 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 872 |
} |
| 873 |
|
| 874 |
|
| 875 |
type IntentPayload struct { |
| 876 |
|
| 877 |
CreateIntent *CreateSubscriptionIntent `json:"createIntent,omitempty"` |
| 878 |
|
| 879 |
EntitleIntent *EntitleSubscriptionIntent `json:"entitleIntent,omitempty"` |
| 880 |
|
| 881 |
IntentOptions *IntentPayloadIntentOptions `json:"intentOptions,omitempty"` |
| 882 |
|
| 883 |
|
| 884 |
|
| 885 |
|
| 886 |
|
| 887 |
ForceSendFields []string `json:"-"` |
| 888 |
|
| 889 |
|
| 890 |
|
| 891 |
|
| 892 |
NullFields []string `json:"-"` |
| 893 |
} |
| 894 |
|
| 895 |
func (s IntentPayload) MarshalJSON() ([]byte, error) { |
| 896 |
type NoMethod IntentPayload |
| 897 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 898 |
} |
| 899 |
|
| 900 |
|
| 901 |
type IntentPayloadIntentOptions struct { |
| 902 |
|
| 903 |
|
| 904 |
|
| 905 |
EnableOfferOverride bool `json:"enableOfferOverride,omitempty"` |
| 906 |
|
| 907 |
|
| 908 |
|
| 909 |
|
| 910 |
|
| 911 |
ForceSendFields []string `json:"-"` |
| 912 |
|
| 913 |
|
| 914 |
|
| 915 |
|
| 916 |
NullFields []string `json:"-"` |
| 917 |
} |
| 918 |
|
| 919 |
func (s IntentPayloadIntentOptions) MarshalJSON() ([]byte, error) { |
| 920 |
type NoMethod IntentPayloadIntentOptions |
| 921 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 922 |
} |
| 923 |
|
| 924 |
|
| 925 |
type ListProductsResponse struct { |
| 926 |
|
| 927 |
|
| 928 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 929 |
|
| 930 |
Products []*Product `json:"products,omitempty"` |
| 931 |
|
| 932 |
|
| 933 |
googleapi.ServerResponse `json:"-"` |
| 934 |
|
| 935 |
|
| 936 |
|
| 937 |
|
| 938 |
|
| 939 |
ForceSendFields []string `json:"-"` |
| 940 |
|
| 941 |
|
| 942 |
|
| 943 |
|
| 944 |
NullFields []string `json:"-"` |
| 945 |
} |
| 946 |
|
| 947 |
func (s ListProductsResponse) MarshalJSON() ([]byte, error) { |
| 948 |
type NoMethod ListProductsResponse |
| 949 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 950 |
} |
| 951 |
|
| 952 |
|
| 953 |
type ListPromotionsResponse struct { |
| 954 |
|
| 955 |
|
| 956 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 957 |
|
| 958 |
Promotions []*Promotion `json:"promotions,omitempty"` |
| 959 |
|
| 960 |
|
| 961 |
googleapi.ServerResponse `json:"-"` |
| 962 |
|
| 963 |
|
| 964 |
|
| 965 |
|
| 966 |
|
| 967 |
ForceSendFields []string `json:"-"` |
| 968 |
|
| 969 |
|
| 970 |
|
| 971 |
|
| 972 |
NullFields []string `json:"-"` |
| 973 |
} |
| 974 |
|
| 975 |
func (s ListPromotionsResponse) MarshalJSON() ([]byte, error) { |
| 976 |
type NoMethod ListPromotionsResponse |
| 977 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 978 |
} |
| 979 |
|
| 980 |
|
| 981 |
type Location struct { |
| 982 |
|
| 983 |
PostalCode string `json:"postalCode,omitempty"` |
| 984 |
|
| 985 |
66-1 |
| 986 |
RegionCode string `json:"regionCode,omitempty"` |
| 987 |
|
| 988 |
|
| 989 |
|
| 990 |
|
| 991 |
|
| 992 |
ForceSendFields []string `json:"-"` |
| 993 |
|
| 994 |
|
| 995 |
|
| 996 |
|
| 997 |
NullFields []string `json:"-"` |
| 998 |
} |
| 999 |
|
| 1000 |
func (s Location) MarshalJSON() ([]byte, error) { |
| 1001 |
type NoMethod Location |
| 1002 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1003 |
} |
| 1004 |
|
| 1005 |
|
| 1006 |
|
| 1007 |
type Product struct { |
| 1008 |
|
| 1009 |
BundleDetails *ProductBundleDetails `json:"bundleDetails,omitempty"` |
| 1010 |
|
| 1011 |
|
| 1012 |
|
| 1013 |
FiniteBillingCycleDetails *FiniteBillingCycleDetails `json:"finiteBillingCycleDetails,omitempty"` |
| 1014 |
|
| 1015 |
|
| 1016 |
Name string `json:"name,omitempty"` |
| 1017 |
|
| 1018 |
|
| 1019 |
PriceConfigs []*ProductPriceConfig `json:"priceConfigs,omitempty"` |
| 1020 |
|
| 1021 |
|
| 1022 |
|
| 1023 |
|
| 1024 |
|
| 1025 |
|
| 1026 |
|
| 1027 |
|
| 1028 |
ProductType string `json:"productType,omitempty"` |
| 1029 |
|
| 1030 |
|
| 1031 |
|
| 1032 |
RegionCodes []string `json:"regionCodes,omitempty"` |
| 1033 |
|
| 1034 |
|
| 1035 |
SubscriptionBillingCycleDuration *Duration `json:"subscriptionBillingCycleDuration,omitempty"` |
| 1036 |
|
| 1037 |
Titles []*GoogleTypeLocalizedText `json:"titles,omitempty"` |
| 1038 |
|
| 1039 |
|
| 1040 |
|
| 1041 |
|
| 1042 |
|
| 1043 |
ForceSendFields []string `json:"-"` |
| 1044 |
|
| 1045 |
|
| 1046 |
|
| 1047 |
|
| 1048 |
NullFields []string `json:"-"` |
| 1049 |
} |
| 1050 |
|
| 1051 |
func (s Product) MarshalJSON() ([]byte, error) { |
| 1052 |
type NoMethod Product |
| 1053 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1054 |
} |
| 1055 |
|
| 1056 |
|
| 1057 |
type ProductBundleDetails struct { |
| 1058 |
|
| 1059 |
BundleElements []*ProductBundleDetailsBundleElement `json:"bundleElements,omitempty"` |
| 1060 |
|
| 1061 |
|
| 1062 |
|
| 1063 |
|
| 1064 |
|
| 1065 |
|
| 1066 |
|
| 1067 |
|
| 1068 |
|
| 1069 |
EntitlementMode string `json:"entitlementMode,omitempty"` |
| 1070 |
|
| 1071 |
|
| 1072 |
|
| 1073 |
|
| 1074 |
|
| 1075 |
ForceSendFields []string `json:"-"` |
| 1076 |
|
| 1077 |
|
| 1078 |
|
| 1079 |
|
| 1080 |
NullFields []string `json:"-"` |
| 1081 |
} |
| 1082 |
|
| 1083 |
func (s ProductBundleDetails) MarshalJSON() ([]byte, error) { |
| 1084 |
type NoMethod ProductBundleDetails |
| 1085 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1086 |
} |
| 1087 |
|
| 1088 |
|
| 1089 |
|
| 1090 |
type ProductBundleDetailsBundleElement struct { |
| 1091 |
|
| 1092 |
|
| 1093 |
Product string `json:"product,omitempty"` |
| 1094 |
|
| 1095 |
|
| 1096 |
|
| 1097 |
|
| 1098 |
|
| 1099 |
ForceSendFields []string `json:"-"` |
| 1100 |
|
| 1101 |
|
| 1102 |
|
| 1103 |
|
| 1104 |
NullFields []string `json:"-"` |
| 1105 |
} |
| 1106 |
|
| 1107 |
func (s ProductBundleDetailsBundleElement) MarshalJSON() ([]byte, error) { |
| 1108 |
type NoMethod ProductBundleDetailsBundleElement |
| 1109 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1110 |
} |
| 1111 |
|
| 1112 |
|
| 1113 |
type ProductPayload struct { |
| 1114 |
|
| 1115 |
GoogleHomePayload *GoogleHomePayload `json:"googleHomePayload,omitempty"` |
| 1116 |
|
| 1117 |
|
| 1118 |
GoogleOnePayload *GoogleOnePayload `json:"googleOnePayload,omitempty"` |
| 1119 |
|
| 1120 |
YoutubePayload *YoutubePayload `json:"youtubePayload,omitempty"` |
| 1121 |
|
| 1122 |
|
| 1123 |
|
| 1124 |
|
| 1125 |
|
| 1126 |
ForceSendFields []string `json:"-"` |
| 1127 |
|
| 1128 |
|
| 1129 |
|
| 1130 |
|
| 1131 |
NullFields []string `json:"-"` |
| 1132 |
} |
| 1133 |
|
| 1134 |
func (s ProductPayload) MarshalJSON() ([]byte, error) { |
| 1135 |
type NoMethod ProductPayload |
| 1136 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1137 |
} |
| 1138 |
|
| 1139 |
|
| 1140 |
type ProductPriceConfig struct { |
| 1141 |
|
| 1142 |
Amount *Amount `json:"amount,omitempty"` |
| 1143 |
|
| 1144 |
|
| 1145 |
RegionCode string `json:"regionCode,omitempty"` |
| 1146 |
|
| 1147 |
|
| 1148 |
|
| 1149 |
|
| 1150 |
|
| 1151 |
ForceSendFields []string `json:"-"` |
| 1152 |
|
| 1153 |
|
| 1154 |
|
| 1155 |
|
| 1156 |
NullFields []string `json:"-"` |
| 1157 |
} |
| 1158 |
|
| 1159 |
func (s ProductPriceConfig) MarshalJSON() ([]byte, error) { |
| 1160 |
type NoMethod ProductPriceConfig |
| 1161 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1162 |
} |
| 1163 |
|
| 1164 |
|
| 1165 |
|
| 1166 |
type Promotion struct { |
| 1167 |
|
| 1168 |
|
| 1169 |
ApplicableProducts []string `json:"applicableProducts,omitempty"` |
| 1170 |
|
| 1171 |
|
| 1172 |
|
| 1173 |
EndTime string `json:"endTime,omitempty"` |
| 1174 |
|
| 1175 |
|
| 1176 |
FreeTrialDuration *Duration `json:"freeTrialDuration,omitempty"` |
| 1177 |
|
| 1178 |
|
| 1179 |
IntroductoryPricingDetails *PromotionIntroductoryPricingDetails `json:"introductoryPricingDetails,omitempty"` |
| 1180 |
|
| 1181 |
|
| 1182 |
|
| 1183 |
Name string `json:"name,omitempty"` |
| 1184 |
|
| 1185 |
|
| 1186 |
|
| 1187 |
|
| 1188 |
|
| 1189 |
|
| 1190 |
|
| 1191 |
PromotionType string `json:"promotionType,omitempty"` |
| 1192 |
|
| 1193 |
|
| 1194 |
|
| 1195 |
RegionCodes []string `json:"regionCodes,omitempty"` |
| 1196 |
|
| 1197 |
|
| 1198 |
StartTime string `json:"startTime,omitempty"` |
| 1199 |
|
| 1200 |
Titles []*GoogleTypeLocalizedText `json:"titles,omitempty"` |
| 1201 |
|
| 1202 |
|
| 1203 |
|
| 1204 |
|
| 1205 |
|
| 1206 |
ForceSendFields []string `json:"-"` |
| 1207 |
|
| 1208 |
|
| 1209 |
|
| 1210 |
|
| 1211 |
NullFields []string `json:"-"` |
| 1212 |
} |
| 1213 |
|
| 1214 |
func (s Promotion) MarshalJSON() ([]byte, error) { |
| 1215 |
type NoMethod Promotion |
| 1216 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1217 |
} |
| 1218 |
|
| 1219 |
|
| 1220 |
|
| 1221 |
type PromotionIntroductoryPricingDetails struct { |
| 1222 |
|
| 1223 |
|
| 1224 |
IntroductoryPricingSpecs []*PromotionIntroductoryPricingDetailsIntroductoryPricingSpec `json:"introductoryPricingSpecs,omitempty"` |
| 1225 |
|
| 1226 |
|
| 1227 |
|
| 1228 |
|
| 1229 |
|
| 1230 |
ForceSendFields []string `json:"-"` |
| 1231 |
|
| 1232 |
|
| 1233 |
|
| 1234 |
|
| 1235 |
NullFields []string `json:"-"` |
| 1236 |
} |
| 1237 |
|
| 1238 |
func (s PromotionIntroductoryPricingDetails) MarshalJSON() ([]byte, error) { |
| 1239 |
type NoMethod PromotionIntroductoryPricingDetails |
| 1240 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1241 |
} |
| 1242 |
|
| 1243 |
|
| 1244 |
|
| 1245 |
type PromotionIntroductoryPricingDetailsIntroductoryPricingSpec struct { |
| 1246 |
|
| 1247 |
DiscountAmount *Amount `json:"discountAmount,omitempty"` |
| 1248 |
|
| 1249 |
|
| 1250 |
DiscountRatioMicros int64 `json:"discountRatioMicros,omitempty,string"` |
| 1251 |
|
| 1252 |
|
| 1253 |
RecurrenceCount int64 `json:"recurrenceCount,omitempty"` |
| 1254 |
|
| 1255 |
|
| 1256 |
RegionCode string `json:"regionCode,omitempty"` |
| 1257 |
|
| 1258 |
|
| 1259 |
|
| 1260 |
|
| 1261 |
|
| 1262 |
ForceSendFields []string `json:"-"` |
| 1263 |
|
| 1264 |
|
| 1265 |
|
| 1266 |
|
| 1267 |
NullFields []string `json:"-"` |
| 1268 |
} |
| 1269 |
|
| 1270 |
func (s PromotionIntroductoryPricingDetailsIntroductoryPricingSpec) MarshalJSON() ([]byte, error) { |
| 1271 |
type NoMethod PromotionIntroductoryPricingDetailsIntroductoryPricingSpec |
| 1272 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1273 |
} |
| 1274 |
|
| 1275 |
|
| 1276 |
type ResumeSubscriptionRequest struct { |
| 1277 |
|
| 1278 |
CycleOptions *CycleOptions `json:"cycleOptions,omitempty"` |
| 1279 |
|
| 1280 |
|
| 1281 |
|
| 1282 |
|
| 1283 |
|
| 1284 |
|
| 1285 |
|
| 1286 |
|
| 1287 |
|
| 1288 |
|
| 1289 |
ResumeMode string `json:"resumeMode,omitempty"` |
| 1290 |
|
| 1291 |
|
| 1292 |
|
| 1293 |
|
| 1294 |
|
| 1295 |
ForceSendFields []string `json:"-"` |
| 1296 |
|
| 1297 |
|
| 1298 |
|
| 1299 |
|
| 1300 |
NullFields []string `json:"-"` |
| 1301 |
} |
| 1302 |
|
| 1303 |
func (s ResumeSubscriptionRequest) MarshalJSON() ([]byte, error) { |
| 1304 |
type NoMethod ResumeSubscriptionRequest |
| 1305 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1306 |
} |
| 1307 |
|
| 1308 |
|
| 1309 |
type ResumeSubscriptionResponse struct { |
| 1310 |
|
| 1311 |
Subscription *Subscription `json:"subscription,omitempty"` |
| 1312 |
|
| 1313 |
|
| 1314 |
googleapi.ServerResponse `json:"-"` |
| 1315 |
|
| 1316 |
|
| 1317 |
|
| 1318 |
|
| 1319 |
|
| 1320 |
ForceSendFields []string `json:"-"` |
| 1321 |
|
| 1322 |
|
| 1323 |
|
| 1324 |
|
| 1325 |
NullFields []string `json:"-"` |
| 1326 |
} |
| 1327 |
|
| 1328 |
func (s ResumeSubscriptionResponse) MarshalJSON() ([]byte, error) { |
| 1329 |
type NoMethod ResumeSubscriptionResponse |
| 1330 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1331 |
} |
| 1332 |
|
| 1333 |
|
| 1334 |
|
| 1335 |
type ServicePeriod struct { |
| 1336 |
|
| 1337 |
EndTime string `json:"endTime,omitempty"` |
| 1338 |
|
| 1339 |
|
| 1340 |
StartTime string `json:"startTime,omitempty"` |
| 1341 |
|
| 1342 |
|
| 1343 |
|
| 1344 |
|
| 1345 |
|
| 1346 |
ForceSendFields []string `json:"-"` |
| 1347 |
|
| 1348 |
|
| 1349 |
|
| 1350 |
|
| 1351 |
NullFields []string `json:"-"` |
| 1352 |
} |
| 1353 |
|
| 1354 |
func (s ServicePeriod) MarshalJSON() ([]byte, error) { |
| 1355 |
type NoMethod ServicePeriod |
| 1356 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1357 |
} |
| 1358 |
|
| 1359 |
|
| 1360 |
|
| 1361 |
|
| 1362 |
|
| 1363 |
|
| 1364 |
|
| 1365 |
|
| 1366 |
type Subscription struct { |
| 1367 |
|
| 1368 |
|
| 1369 |
CancellationDetails *SubscriptionCancellationDetails `json:"cancellationDetails,omitempty"` |
| 1370 |
|
| 1371 |
|
| 1372 |
CreateTime string `json:"createTime,omitempty"` |
| 1373 |
|
| 1374 |
|
| 1375 |
|
| 1376 |
CycleEndTime string `json:"cycleEndTime,omitempty"` |
| 1377 |
|
| 1378 |
|
| 1379 |
EndUserEntitled bool `json:"endUserEntitled,omitempty"` |
| 1380 |
|
| 1381 |
|
| 1382 |
|
| 1383 |
FreeTrialEndTime string `json:"freeTrialEndTime,omitempty"` |
| 1384 |
|
| 1385 |
LineItems []*SubscriptionLineItem `json:"lineItems,omitempty"` |
| 1386 |
|
| 1387 |
|
| 1388 |
|
| 1389 |
MigrationDetails *SubscriptionMigrationDetails `json:"migrationDetails,omitempty"` |
| 1390 |
|
| 1391 |
|
| 1392 |
|
| 1393 |
Name string `json:"name,omitempty"` |
| 1394 |
’s |
| 1395 |
|
| 1396 |
PartnerUserToken string `json:"partnerUserToken,omitempty"` |
| 1397 |
|
| 1398 |
|
| 1399 |
|
| 1400 |
|
| 1401 |
|
| 1402 |
|
| 1403 |
|
| 1404 |
|
| 1405 |
|
| 1406 |
|
| 1407 |
ProcessingState string `json:"processingState,omitempty"` |
| 1408 |
|
| 1409 |
|
| 1410 |
|
| 1411 |
Products []string `json:"products,omitempty"` |
| 1412 |
|
| 1413 |
|
| 1414 |
|
| 1415 |
|
| 1416 |
PromotionSpecs []*SubscriptionPromotionSpec `json:"promotionSpecs,omitempty"` |
| 1417 |
|
| 1418 |
|
| 1419 |
|
| 1420 |
|
| 1421 |
|
| 1422 |
Promotions []string `json:"promotions,omitempty"` |
| 1423 |
|
| 1424 |
|
| 1425 |
|
| 1426 |
PurchaseTime string `json:"purchaseTime,omitempty"` |
| 1427 |
|
| 1428 |
|
| 1429 |
|
| 1430 |
|
| 1431 |
RedirectUri string `json:"redirectUri,omitempty"` |
| 1432 |
|
| 1433 |
|
| 1434 |
|
| 1435 |
|
| 1436 |
|
| 1437 |
|
| 1438 |
RenewalTime string `json:"renewalTime,omitempty"` |
| 1439 |
|
| 1440 |
|
| 1441 |
ServiceLocation *Location `json:"serviceLocation,omitempty"` |
| 1442 |
|
| 1443 |
|
| 1444 |
|
| 1445 |
|
| 1446 |
|
| 1447 |
|
| 1448 |
|
| 1449 |
|
| 1450 |
|
| 1451 |
|
| 1452 |
|
| 1453 |
|
| 1454 |
|
| 1455 |
|
| 1456 |
|
| 1457 |
|
| 1458 |
|
| 1459 |
|
| 1460 |
|
| 1461 |
State string `json:"state,omitempty"` |
| 1462 |
|
| 1463 |
|
| 1464 |
UpdateTime string `json:"updateTime,omitempty"` |
| 1465 |
|
| 1466 |
|
| 1467 |
|
| 1468 |
UpgradeDowngradeDetails *SubscriptionUpgradeDowngradeDetails `json:"upgradeDowngradeDetails,omitempty"` |
| 1469 |
|
| 1470 |
|
| 1471 |
googleapi.ServerResponse `json:"-"` |
| 1472 |
|
| 1473 |
|
| 1474 |
|
| 1475 |
|
| 1476 |
|
| 1477 |
ForceSendFields []string `json:"-"` |
| 1478 |
|
| 1479 |
|
| 1480 |
|
| 1481 |
|
| 1482 |
NullFields []string `json:"-"` |
| 1483 |
} |
| 1484 |
|
| 1485 |
func (s Subscription) MarshalJSON() ([]byte, error) { |
| 1486 |
type NoMethod Subscription |
| 1487 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1488 |
} |
| 1489 |
|
| 1490 |
|
| 1491 |
|
| 1492 |
type SubscriptionCancellationDetails struct { |
| 1493 |
|
| 1494 |
|
| 1495 |
|
| 1496 |
|
| 1497 |
|
| 1498 |
|
| 1499 |
|
| 1500 |
|
| 1501 |
|
| 1502 |
|
| 1503 |
|
| 1504 |
|
| 1505 |
|
| 1506 |
|
| 1507 |
|
| 1508 |
|
| 1509 |
|
| 1510 |
|
| 1511 |
|
| 1512 |
|
| 1513 |
|
| 1514 |
|
| 1515 |
|
| 1516 |
Reason string `json:"reason,omitempty"` |
| 1517 |
|
| 1518 |
|
| 1519 |
|
| 1520 |
|
| 1521 |
|
| 1522 |
ForceSendFields []string `json:"-"` |
| 1523 |
|
| 1524 |
|
| 1525 |
|
| 1526 |
|
| 1527 |
NullFields []string `json:"-"` |
| 1528 |
} |
| 1529 |
|
| 1530 |
func (s SubscriptionCancellationDetails) MarshalJSON() ([]byte, error) { |
| 1531 |
type NoMethod SubscriptionCancellationDetails |
| 1532 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1533 |
} |
| 1534 |
|
| 1535 |
|
| 1536 |
type SubscriptionLineItem struct { |
| 1537 |
|
| 1538 |
|
| 1539 |
|
| 1540 |
Amount *Amount `json:"amount,omitempty"` |
| 1541 |
|
| 1542 |
|
| 1543 |
BundleDetails *SubscriptionLineItemBundleDetails `json:"bundleDetails,omitempty"` |
| 1544 |
|
| 1545 |
Description string `json:"description,omitempty"` |
| 1546 |
|
| 1547 |
|
| 1548 |
|
| 1549 |
FiniteBillingCycleDetails *FiniteBillingCycleDetails `json:"finiteBillingCycleDetails,omitempty"` |
| 1550 |
|
| 1551 |
|
| 1552 |
|
| 1553 |
|
| 1554 |
|
| 1555 |
LineItemFreeTrialEndTime string `json:"lineItemFreeTrialEndTime,omitempty"` |
| 1556 |
|
| 1557 |
LineItemIndex int64 `json:"lineItemIndex,omitempty"` |
| 1558 |
|
| 1559 |
|
| 1560 |
|
| 1561 |
|
| 1562 |
LineItemPromotionSpecs []*SubscriptionPromotionSpec `json:"lineItemPromotionSpecs,omitempty"` |
| 1563 |
|
| 1564 |
|
| 1565 |
Name string `json:"name,omitempty"` |
| 1566 |
|
| 1567 |
|
| 1568 |
OneTimeRecurrenceDetails *SubscriptionLineItemOneTimeRecurrenceDetails `json:"oneTimeRecurrenceDetails,omitempty"` |
| 1569 |
|
| 1570 |
|
| 1571 |
|
| 1572 |
Product string `json:"product,omitempty"` |
| 1573 |
|
| 1574 |
ProductPayload *ProductPayload `json:"productPayload,omitempty"` |
| 1575 |
|
| 1576 |
|
| 1577 |
|
| 1578 |
|
| 1579 |
|
| 1580 |
|
| 1581 |
|
| 1582 |
|
| 1583 |
RecurrenceType string `json:"recurrenceType,omitempty"` |
| 1584 |
|
| 1585 |
|
| 1586 |
|
| 1587 |
|
| 1588 |
|
| 1589 |
|
| 1590 |
|
| 1591 |
|
| 1592 |
|
| 1593 |
|
| 1594 |
|
| 1595 |
|
| 1596 |
|
| 1597 |
|
| 1598 |
|
| 1599 |
|
| 1600 |
|
| 1601 |
|
| 1602 |
|
| 1603 |
|
| 1604 |
State string `json:"state,omitempty"` |
| 1605 |
|
| 1606 |
|
| 1607 |
googleapi.ServerResponse `json:"-"` |
| 1608 |
|
| 1609 |
|
| 1610 |
|
| 1611 |
|
| 1612 |
|
| 1613 |
ForceSendFields []string `json:"-"` |
| 1614 |
|
| 1615 |
|
| 1616 |
|
| 1617 |
|
| 1618 |
NullFields []string `json:"-"` |
| 1619 |
} |
| 1620 |
|
| 1621 |
func (s SubscriptionLineItem) MarshalJSON() ([]byte, error) { |
| 1622 |
type NoMethod SubscriptionLineItem |
| 1623 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1624 |
} |
| 1625 |
|
| 1626 |
|
| 1627 |
|
| 1628 |
type SubscriptionLineItemBundleDetails struct { |
| 1629 |
|
| 1630 |
|
| 1631 |
BundleElementDetails []*SubscriptionLineItemBundleDetailsBundleElementDetails `json:"bundleElementDetails,omitempty"` |
| 1632 |
|
| 1633 |
|
| 1634 |
|
| 1635 |
|
| 1636 |
|
| 1637 |
ForceSendFields []string `json:"-"` |
| 1638 |
|
| 1639 |
|
| 1640 |
|
| 1641 |
|
| 1642 |
NullFields []string `json:"-"` |
| 1643 |
} |
| 1644 |
|
| 1645 |
func (s SubscriptionLineItemBundleDetails) MarshalJSON() ([]byte, error) { |
| 1646 |
type NoMethod SubscriptionLineItemBundleDetails |
| 1647 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1648 |
} |
| 1649 |
|
| 1650 |
|
| 1651 |
|
| 1652 |
type SubscriptionLineItemBundleDetailsBundleElementDetails struct { |
| 1653 |
|
| 1654 |
|
| 1655 |
Product string `json:"product,omitempty"` |
| 1656 |
|
| 1657 |
|
| 1658 |
UserAccountLinkedTime string `json:"userAccountLinkedTime,omitempty"` |
| 1659 |
|
| 1660 |
|
| 1661 |
|
| 1662 |
|
| 1663 |
|
| 1664 |
ForceSendFields []string `json:"-"` |
| 1665 |
|
| 1666 |
|
| 1667 |
|
| 1668 |
|
| 1669 |
NullFields []string `json:"-"` |
| 1670 |
} |
| 1671 |
|
| 1672 |
func (s SubscriptionLineItemBundleDetailsBundleElementDetails) MarshalJSON() ([]byte, error) { |
| 1673 |
type NoMethod SubscriptionLineItemBundleDetailsBundleElementDetails |
| 1674 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1675 |
} |
| 1676 |
|
| 1677 |
|
| 1678 |
|
| 1679 |
type SubscriptionLineItemOneTimeRecurrenceDetails struct { |
| 1680 |
|
| 1681 |
ServicePeriod *ServicePeriod `json:"servicePeriod,omitempty"` |
| 1682 |
|
| 1683 |
|
| 1684 |
|
| 1685 |
|
| 1686 |
|
| 1687 |
ForceSendFields []string `json:"-"` |
| 1688 |
|
| 1689 |
|
| 1690 |
|
| 1691 |
|
| 1692 |
NullFields []string `json:"-"` |
| 1693 |
} |
| 1694 |
|
| 1695 |
func (s SubscriptionLineItemOneTimeRecurrenceDetails) MarshalJSON() ([]byte, error) { |
| 1696 |
type NoMethod SubscriptionLineItemOneTimeRecurrenceDetails |
| 1697 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1698 |
} |
| 1699 |
|
| 1700 |
|
| 1701 |
|
| 1702 |
type SubscriptionMigrationDetails struct { |
| 1703 |
|
| 1704 |
|
| 1705 |
MigratedSubscriptionId string `json:"migratedSubscriptionId,omitempty"` |
| 1706 |
|
| 1707 |
|
| 1708 |
|
| 1709 |
|
| 1710 |
|
| 1711 |
ForceSendFields []string `json:"-"` |
| 1712 |
|
| 1713 |
|
| 1714 |
|
| 1715 |
|
| 1716 |
NullFields []string `json:"-"` |
| 1717 |
} |
| 1718 |
|
| 1719 |
func (s SubscriptionMigrationDetails) MarshalJSON() ([]byte, error) { |
| 1720 |
type NoMethod SubscriptionMigrationDetails |
| 1721 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1722 |
} |
| 1723 |
|
| 1724 |
|
| 1725 |
type SubscriptionPromotionSpec struct { |
| 1726 |
|
| 1727 |
|
| 1728 |
FreeTrialDuration *Duration `json:"freeTrialDuration,omitempty"` |
| 1729 |
|
| 1730 |
|
| 1731 |
IntroductoryPricingDetails *PromotionIntroductoryPricingDetails `json:"introductoryPricingDetails,omitempty"` |
| 1732 |
|
| 1733 |
|
| 1734 |
Promotion string `json:"promotion,omitempty"` |
| 1735 |
|
| 1736 |
|
| 1737 |
|
| 1738 |
|
| 1739 |
|
| 1740 |
|
| 1741 |
|
| 1742 |
Type string `json:"type,omitempty"` |
| 1743 |
|
| 1744 |
|
| 1745 |
|
| 1746 |
|
| 1747 |
|
| 1748 |
ForceSendFields []string `json:"-"` |
| 1749 |
|
| 1750 |
|
| 1751 |
|
| 1752 |
|
| 1753 |
NullFields []string `json:"-"` |
| 1754 |
} |
| 1755 |
|
| 1756 |
func (s SubscriptionPromotionSpec) MarshalJSON() ([]byte, error) { |
| 1757 |
type NoMethod SubscriptionPromotionSpec |
| 1758 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1759 |
} |
| 1760 |
|
| 1761 |
|
| 1762 |
|
| 1763 |
type SubscriptionUpgradeDowngradeDetails struct { |
| 1764 |
|
| 1765 |
|
| 1766 |
|
| 1767 |
|
| 1768 |
|
| 1769 |
|
| 1770 |
|
| 1771 |
|
| 1772 |
|
| 1773 |
|
| 1774 |
|
| 1775 |
|
| 1776 |
|
| 1777 |
|
| 1778 |
BillingCycleSpec string `json:"billingCycleSpec,omitempty"` |
| 1779 |
|
| 1780 |
|
| 1781 |
|
| 1782 |
|
| 1783 |
|
| 1784 |
PreviousSubscriptionId string `json:"previousSubscriptionId,omitempty"` |
| 1785 |
|
| 1786 |
|
| 1787 |
|
| 1788 |
|
| 1789 |
|
| 1790 |
ForceSendFields []string `json:"-"` |
| 1791 |
|
| 1792 |
|
| 1793 |
|
| 1794 |
|
| 1795 |
NullFields []string `json:"-"` |
| 1796 |
} |
| 1797 |
|
| 1798 |
func (s SubscriptionUpgradeDowngradeDetails) MarshalJSON() ([]byte, error) { |
| 1799 |
type NoMethod SubscriptionUpgradeDowngradeDetails |
| 1800 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1801 |
} |
| 1802 |
|
| 1803 |
|
| 1804 |
type SuspendSubscriptionRequest struct { |
| 1805 |
} |
| 1806 |
|
| 1807 |
|
| 1808 |
|
| 1809 |
type SuspendSubscriptionResponse struct { |
| 1810 |
|
| 1811 |
Subscription *Subscription `json:"subscription,omitempty"` |
| 1812 |
|
| 1813 |
|
| 1814 |
googleapi.ServerResponse `json:"-"` |
| 1815 |
|
| 1816 |
|
| 1817 |
|
| 1818 |
|
| 1819 |
|
| 1820 |
ForceSendFields []string `json:"-"` |
| 1821 |
|
| 1822 |
|
| 1823 |
|
| 1824 |
|
| 1825 |
NullFields []string `json:"-"` |
| 1826 |
} |
| 1827 |
|
| 1828 |
func (s SuspendSubscriptionResponse) MarshalJSON() ([]byte, error) { |
| 1829 |
type NoMethod SuspendSubscriptionResponse |
| 1830 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1831 |
} |
| 1832 |
|
| 1833 |
|
| 1834 |
type UndoCancelSubscriptionRequest struct { |
| 1835 |
} |
| 1836 |
|
| 1837 |
|
| 1838 |
|
| 1839 |
type UndoCancelSubscriptionResponse struct { |
| 1840 |
|
| 1841 |
Subscription *Subscription `json:"subscription,omitempty"` |
| 1842 |
|
| 1843 |
|
| 1844 |
googleapi.ServerResponse `json:"-"` |
| 1845 |
|
| 1846 |
|
| 1847 |
|
| 1848 |
|
| 1849 |
|
| 1850 |
ForceSendFields []string `json:"-"` |
| 1851 |
|
| 1852 |
|
| 1853 |
|
| 1854 |
|
| 1855 |
NullFields []string `json:"-"` |
| 1856 |
} |
| 1857 |
|
| 1858 |
func (s UndoCancelSubscriptionResponse) MarshalJSON() ([]byte, error) { |
| 1859 |
type NoMethod UndoCancelSubscriptionResponse |
| 1860 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1861 |
} |
| 1862 |
|
| 1863 |
|
| 1864 |
|
| 1865 |
|
| 1866 |
|
| 1867 |
|
| 1868 |
|
| 1869 |
|
| 1870 |
|
| 1871 |
|
| 1872 |
|
| 1873 |
|
| 1874 |
type UserSession struct { |
| 1875 |
|
| 1876 |
ExpireTime string `json:"expireTime,omitempty"` |
| 1877 |
|
| 1878 |
|
| 1879 |
|
| 1880 |
Token string `json:"token,omitempty"` |
| 1881 |
|
| 1882 |
|
| 1883 |
|
| 1884 |
|
| 1885 |
|
| 1886 |
ForceSendFields []string `json:"-"` |
| 1887 |
|
| 1888 |
|
| 1889 |
|
| 1890 |
|
| 1891 |
NullFields []string `json:"-"` |
| 1892 |
} |
| 1893 |
|
| 1894 |
func (s UserSession) MarshalJSON() ([]byte, error) { |
| 1895 |
type NoMethod UserSession |
| 1896 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1897 |
} |
| 1898 |
|
| 1899 |
|
| 1900 |
type YoutubePayload struct { |
| 1901 |
|
| 1902 |
AccessEndTime string `json:"accessEndTime,omitempty"` |
| 1903 |
|
| 1904 |
|
| 1905 |
PartnerEligibilityIds []string `json:"partnerEligibilityIds,omitempty"` |
| 1906 |
|
| 1907 |
|
| 1908 |
|
| 1909 |
|
| 1910 |
|
| 1911 |
|
| 1912 |
|
| 1913 |
|
| 1914 |
|
| 1915 |
|
| 1916 |
|
| 1917 |
|
| 1918 |
|
| 1919 |
PartnerPlanType string `json:"partnerPlanType,omitempty"` |
| 1920 |
|
| 1921 |
|
| 1922 |
|
| 1923 |
|
| 1924 |
|
| 1925 |
ForceSendFields []string `json:"-"` |
| 1926 |
|
| 1927 |
|
| 1928 |
|
| 1929 |
|
| 1930 |
NullFields []string `json:"-"` |
| 1931 |
} |
| 1932 |
|
| 1933 |
func (s YoutubePayload) MarshalJSON() ([]byte, error) { |
| 1934 |
type NoMethod YoutubePayload |
| 1935 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1936 |
} |
| 1937 |
|
| 1938 |
type PartnersProductsListCall struct { |
| 1939 |
s *Service |
| 1940 |
parent string |
| 1941 |
urlParams_ gensupport.URLParams |
| 1942 |
ifNoneMatch_ string |
| 1943 |
ctx_ context.Context |
| 1944 |
header_ http.Header |
| 1945 |
} |
| 1946 |
|
| 1947 |
|
| 1948 |
|
| 1949 |
|
| 1950 |
|
| 1951 |
|
| 1952 |
|
| 1953 |
func (r *PartnersProductsService) List(parent string) *PartnersProductsListCall { |
| 1954 |
c := &PartnersProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 1955 |
c.parent = parent |
| 1956 |
return c |
| 1957 |
} |
| 1958 |
|
| 1959 |
|
| 1960 |
|
| 1961 |
|
| 1962 |
|
| 1963 |
|
| 1964 |
|
| 1965 |
|
| 1966 |
|
| 1967 |
|
| 1968 |
|
| 1969 |
func (c *PartnersProductsListCall) Filter(filter string) *PartnersProductsListCall { |
| 1970 |
c.urlParams_.Set("filter", filter) |
| 1971 |
return c |
| 1972 |
} |
| 1973 |
|
| 1974 |
|
| 1975 |
|
| 1976 |
|
| 1977 |
|
| 1978 |
func (c *PartnersProductsListCall) PageSize(pageSize int64) *PartnersProductsListCall { |
| 1979 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 1980 |
return c |
| 1981 |
} |
| 1982 |
|
| 1983 |
|
| 1984 |
|
| 1985 |
|
| 1986 |
|
| 1987 |
func (c *PartnersProductsListCall) PageToken(pageToken string) *PartnersProductsListCall { |
| 1988 |
c.urlParams_.Set("pageToken", pageToken) |
| 1989 |
return c |
| 1990 |
} |
| 1991 |
|
| 1992 |
|
| 1993 |
|
| 1994 |
|
| 1995 |
func (c *PartnersProductsListCall) Fields(s ...googleapi.Field) *PartnersProductsListCall { |
| 1996 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 1997 |
return c |
| 1998 |
} |
| 1999 |
|
| 2000 |
|
| 2001 |
|
| 2002 |
|
| 2003 |
func (c *PartnersProductsListCall) IfNoneMatch(entityTag string) *PartnersProductsListCall { |
| 2004 |
c.ifNoneMatch_ = entityTag |
| 2005 |
return c |
| 2006 |
} |
| 2007 |
|
| 2008 |
|
| 2009 |
func (c *PartnersProductsListCall) Context(ctx context.Context) *PartnersProductsListCall { |
| 2010 |
c.ctx_ = ctx |
| 2011 |
return c |
| 2012 |
} |
| 2013 |
|
| 2014 |
|
| 2015 |
|
| 2016 |
func (c *PartnersProductsListCall) Header() http.Header { |
| 2017 |
if c.header_ == nil { |
| 2018 |
c.header_ = make(http.Header) |
| 2019 |
} |
| 2020 |
return c.header_ |
| 2021 |
} |
| 2022 |
|
| 2023 |
func (c *PartnersProductsListCall) doRequest(alt string) (*http.Response, error) { |
| 2024 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 2025 |
if c.ifNoneMatch_ != "" { |
| 2026 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 2027 |
} |
| 2028 |
c.urlParams_.Set("alt", alt) |
| 2029 |
c.urlParams_.Set("prettyPrint", "false") |
| 2030 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/products") |
| 2031 |
urls += "?" + c.urlParams_.Encode() |
| 2032 |
req, err := http.NewRequest("GET", urls, nil) |
| 2033 |
if err != nil { |
| 2034 |
return nil, err |
| 2035 |
} |
| 2036 |
req.Header = reqHeaders |
| 2037 |
googleapi.Expand(req.URL, map[string]string{ |
| 2038 |
"parent": c.parent, |
| 2039 |
}) |
| 2040 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.products.list", "request", internallog.HTTPRequest(req, nil)) |
| 2041 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 2042 |
} |
| 2043 |
|
| 2044 |
|
| 2045 |
|
| 2046 |
|
| 2047 |
|
| 2048 |
|
| 2049 |
|
| 2050 |
func (c *PartnersProductsListCall) Do(opts ...googleapi.CallOption) (*ListProductsResponse, error) { |
| 2051 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 2052 |
res, err := c.doRequest("json") |
| 2053 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 2054 |
if res.Body != nil { |
| 2055 |
res.Body.Close() |
| 2056 |
} |
| 2057 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 2058 |
Code: res.StatusCode, |
| 2059 |
Header: res.Header, |
| 2060 |
}) |
| 2061 |
} |
| 2062 |
if err != nil { |
| 2063 |
return nil, err |
| 2064 |
} |
| 2065 |
defer googleapi.CloseBody(res) |
| 2066 |
if err := googleapi.CheckResponse(res); err != nil { |
| 2067 |
return nil, gensupport.WrapError(err) |
| 2068 |
} |
| 2069 |
ret := &ListProductsResponse{ |
| 2070 |
ServerResponse: googleapi.ServerResponse{ |
| 2071 |
Header: res.Header, |
| 2072 |
HTTPStatusCode: res.StatusCode, |
| 2073 |
}, |
| 2074 |
} |
| 2075 |
target := &ret |
| 2076 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 2077 |
if err != nil { |
| 2078 |
return nil, err |
| 2079 |
} |
| 2080 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.products.list", "response", internallog.HTTPResponse(res, b)) |
| 2081 |
return ret, nil |
| 2082 |
} |
| 2083 |
|
| 2084 |
|
| 2085 |
|
| 2086 |
|
| 2087 |
func (c *PartnersProductsListCall) Pages(ctx context.Context, f func(*ListProductsResponse) error) error { |
| 2088 |
c.ctx_ = ctx |
| 2089 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 2090 |
for { |
| 2091 |
x, err := c.Do() |
| 2092 |
if err != nil { |
| 2093 |
return err |
| 2094 |
} |
| 2095 |
if err := f(x); err != nil { |
| 2096 |
return err |
| 2097 |
} |
| 2098 |
if x.NextPageToken == "" { |
| 2099 |
return nil |
| 2100 |
} |
| 2101 |
c.PageToken(x.NextPageToken) |
| 2102 |
} |
| 2103 |
} |
| 2104 |
|
| 2105 |
type PartnersPromotionsFindEligibleCall struct { |
| 2106 |
s *Service |
| 2107 |
parent string |
| 2108 |
findeligiblepromotionsrequest *FindEligiblePromotionsRequest |
| 2109 |
urlParams_ gensupport.URLParams |
| 2110 |
ctx_ context.Context |
| 2111 |
header_ http.Header |
| 2112 |
} |
| 2113 |
|
| 2114 |
|
| 2115 |
|
| 2116 |
|
| 2117 |
|
| 2118 |
|
| 2119 |
|
| 2120 |
|
| 2121 |
func (r *PartnersPromotionsService) FindEligible(parent string, findeligiblepromotionsrequest *FindEligiblePromotionsRequest) *PartnersPromotionsFindEligibleCall { |
| 2122 |
c := &PartnersPromotionsFindEligibleCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 2123 |
c.parent = parent |
| 2124 |
c.findeligiblepromotionsrequest = findeligiblepromotionsrequest |
| 2125 |
return c |
| 2126 |
} |
| 2127 |
|
| 2128 |
|
| 2129 |
|
| 2130 |
|
| 2131 |
func (c *PartnersPromotionsFindEligibleCall) Fields(s ...googleapi.Field) *PartnersPromotionsFindEligibleCall { |
| 2132 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 2133 |
return c |
| 2134 |
} |
| 2135 |
|
| 2136 |
|
| 2137 |
func (c *PartnersPromotionsFindEligibleCall) Context(ctx context.Context) *PartnersPromotionsFindEligibleCall { |
| 2138 |
c.ctx_ = ctx |
| 2139 |
return c |
| 2140 |
} |
| 2141 |
|
| 2142 |
|
| 2143 |
|
| 2144 |
func (c *PartnersPromotionsFindEligibleCall) Header() http.Header { |
| 2145 |
if c.header_ == nil { |
| 2146 |
c.header_ = make(http.Header) |
| 2147 |
} |
| 2148 |
return c.header_ |
| 2149 |
} |
| 2150 |
|
| 2151 |
func (c *PartnersPromotionsFindEligibleCall) doRequest(alt string) (*http.Response, error) { |
| 2152 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 2153 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.findeligiblepromotionsrequest) |
| 2154 |
if err != nil { |
| 2155 |
return nil, err |
| 2156 |
} |
| 2157 |
c.urlParams_.Set("alt", alt) |
| 2158 |
c.urlParams_.Set("prettyPrint", "false") |
| 2159 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/promotions:findEligible") |
| 2160 |
urls += "?" + c.urlParams_.Encode() |
| 2161 |
req, err := http.NewRequest("POST", urls, body) |
| 2162 |
if err != nil { |
| 2163 |
return nil, err |
| 2164 |
} |
| 2165 |
req.Header = reqHeaders |
| 2166 |
googleapi.Expand(req.URL, map[string]string{ |
| 2167 |
"parent": c.parent, |
| 2168 |
}) |
| 2169 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.promotions.findEligible", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 2170 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 2171 |
} |
| 2172 |
|
| 2173 |
|
| 2174 |
|
| 2175 |
|
| 2176 |
|
| 2177 |
|
| 2178 |
|
| 2179 |
func (c *PartnersPromotionsFindEligibleCall) Do(opts ...googleapi.CallOption) (*FindEligiblePromotionsResponse, error) { |
| 2180 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 2181 |
res, err := c.doRequest("json") |
| 2182 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 2183 |
if res.Body != nil { |
| 2184 |
res.Body.Close() |
| 2185 |
} |
| 2186 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 2187 |
Code: res.StatusCode, |
| 2188 |
Header: res.Header, |
| 2189 |
}) |
| 2190 |
} |
| 2191 |
if err != nil { |
| 2192 |
return nil, err |
| 2193 |
} |
| 2194 |
defer googleapi.CloseBody(res) |
| 2195 |
if err := googleapi.CheckResponse(res); err != nil { |
| 2196 |
return nil, gensupport.WrapError(err) |
| 2197 |
} |
| 2198 |
ret := &FindEligiblePromotionsResponse{ |
| 2199 |
ServerResponse: googleapi.ServerResponse{ |
| 2200 |
Header: res.Header, |
| 2201 |
HTTPStatusCode: res.StatusCode, |
| 2202 |
}, |
| 2203 |
} |
| 2204 |
target := &ret |
| 2205 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 2206 |
if err != nil { |
| 2207 |
return nil, err |
| 2208 |
} |
| 2209 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.promotions.findEligible", "response", internallog.HTTPResponse(res, b)) |
| 2210 |
return ret, nil |
| 2211 |
} |
| 2212 |
|
| 2213 |
|
| 2214 |
|
| 2215 |
|
| 2216 |
func (c *PartnersPromotionsFindEligibleCall) Pages(ctx context.Context, f func(*FindEligiblePromotionsResponse) error) error { |
| 2217 |
c.ctx_ = ctx |
| 2218 |
defer func(pt string) { c.findeligiblepromotionsrequest.PageToken = pt }(c.findeligiblepromotionsrequest.PageToken) |
| 2219 |
for { |
| 2220 |
x, err := c.Do() |
| 2221 |
if err != nil { |
| 2222 |
return err |
| 2223 |
} |
| 2224 |
if err := f(x); err != nil { |
| 2225 |
return err |
| 2226 |
} |
| 2227 |
if x.NextPageToken == "" { |
| 2228 |
return nil |
| 2229 |
} |
| 2230 |
c.findeligiblepromotionsrequest.PageToken = x.NextPageToken |
| 2231 |
} |
| 2232 |
} |
| 2233 |
|
| 2234 |
type PartnersPromotionsListCall struct { |
| 2235 |
s *Service |
| 2236 |
parent string |
| 2237 |
urlParams_ gensupport.URLParams |
| 2238 |
ifNoneMatch_ string |
| 2239 |
ctx_ context.Context |
| 2240 |
header_ http.Header |
| 2241 |
} |
| 2242 |
|
| 2243 |
|
| 2244 |
|
| 2245 |
|
| 2246 |
|
| 2247 |
|
| 2248 |
|
| 2249 |
func (r *PartnersPromotionsService) List(parent string) *PartnersPromotionsListCall { |
| 2250 |
c := &PartnersPromotionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 2251 |
c.parent = parent |
| 2252 |
return c |
| 2253 |
} |
| 2254 |
|
| 2255 |
|
| 2256 |
|
| 2257 |
|
| 2258 |
|
| 2259 |
|
| 2260 |
|
| 2261 |
|
| 2262 |
|
| 2263 |
|
| 2264 |
|
| 2265 |
|
| 2266 |
func (c *PartnersPromotionsListCall) Filter(filter string) *PartnersPromotionsListCall { |
| 2267 |
c.urlParams_.Set("filter", filter) |
| 2268 |
return c |
| 2269 |
} |
| 2270 |
|
| 2271 |
|
| 2272 |
|
| 2273 |
|
| 2274 |
|
| 2275 |
func (c *PartnersPromotionsListCall) PageSize(pageSize int64) *PartnersPromotionsListCall { |
| 2276 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 2277 |
return c |
| 2278 |
} |
| 2279 |
|
| 2280 |
|
| 2281 |
|
| 2282 |
|
| 2283 |
|
| 2284 |
func (c *PartnersPromotionsListCall) PageToken(pageToken string) *PartnersPromotionsListCall { |
| 2285 |
c.urlParams_.Set("pageToken", pageToken) |
| 2286 |
return c |
| 2287 |
} |
| 2288 |
|
| 2289 |
|
| 2290 |
|
| 2291 |
|
| 2292 |
func (c *PartnersPromotionsListCall) Fields(s ...googleapi.Field) *PartnersPromotionsListCall { |
| 2293 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 2294 |
return c |
| 2295 |
} |
| 2296 |
|
| 2297 |
|
| 2298 |
|
| 2299 |
|
| 2300 |
func (c *PartnersPromotionsListCall) IfNoneMatch(entityTag string) *PartnersPromotionsListCall { |
| 2301 |
c.ifNoneMatch_ = entityTag |
| 2302 |
return c |
| 2303 |
} |
| 2304 |
|
| 2305 |
|
| 2306 |
func (c *PartnersPromotionsListCall) Context(ctx context.Context) *PartnersPromotionsListCall { |
| 2307 |
c.ctx_ = ctx |
| 2308 |
return c |
| 2309 |
} |
| 2310 |
|
| 2311 |
|
| 2312 |
|
| 2313 |
func (c *PartnersPromotionsListCall) Header() http.Header { |
| 2314 |
if c.header_ == nil { |
| 2315 |
c.header_ = make(http.Header) |
| 2316 |
} |
| 2317 |
return c.header_ |
| 2318 |
} |
| 2319 |
|
| 2320 |
func (c *PartnersPromotionsListCall) doRequest(alt string) (*http.Response, error) { |
| 2321 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 2322 |
if c.ifNoneMatch_ != "" { |
| 2323 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 2324 |
} |
| 2325 |
c.urlParams_.Set("alt", alt) |
| 2326 |
c.urlParams_.Set("prettyPrint", "false") |
| 2327 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/promotions") |
| 2328 |
urls += "?" + c.urlParams_.Encode() |
| 2329 |
req, err := http.NewRequest("GET", urls, nil) |
| 2330 |
if err != nil { |
| 2331 |
return nil, err |
| 2332 |
} |
| 2333 |
req.Header = reqHeaders |
| 2334 |
googleapi.Expand(req.URL, map[string]string{ |
| 2335 |
"parent": c.parent, |
| 2336 |
}) |
| 2337 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.promotions.list", "request", internallog.HTTPRequest(req, nil)) |
| 2338 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 2339 |
} |
| 2340 |
|
| 2341 |
|
| 2342 |
|
| 2343 |
|
| 2344 |
|
| 2345 |
|
| 2346 |
|
| 2347 |
func (c *PartnersPromotionsListCall) Do(opts ...googleapi.CallOption) (*ListPromotionsResponse, error) { |
| 2348 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 2349 |
res, err := c.doRequest("json") |
| 2350 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 2351 |
if res.Body != nil { |
| 2352 |
res.Body.Close() |
| 2353 |
} |
| 2354 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 2355 |
Code: res.StatusCode, |
| 2356 |
Header: res.Header, |
| 2357 |
}) |
| 2358 |
} |
| 2359 |
if err != nil { |
| 2360 |
return nil, err |
| 2361 |
} |
| 2362 |
defer googleapi.CloseBody(res) |
| 2363 |
if err := googleapi.CheckResponse(res); err != nil { |
| 2364 |
return nil, gensupport.WrapError(err) |
| 2365 |
} |
| 2366 |
ret := &ListPromotionsResponse{ |
| 2367 |
ServerResponse: googleapi.ServerResponse{ |
| 2368 |
Header: res.Header, |
| 2369 |
HTTPStatusCode: res.StatusCode, |
| 2370 |
}, |
| 2371 |
} |
| 2372 |
target := &ret |
| 2373 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 2374 |
if err != nil { |
| 2375 |
return nil, err |
| 2376 |
} |
| 2377 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.promotions.list", "response", internallog.HTTPResponse(res, b)) |
| 2378 |
return ret, nil |
| 2379 |
} |
| 2380 |
|
| 2381 |
|
| 2382 |
|
| 2383 |
|
| 2384 |
func (c *PartnersPromotionsListCall) Pages(ctx context.Context, f func(*ListPromotionsResponse) error) error { |
| 2385 |
c.ctx_ = ctx |
| 2386 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 2387 |
for { |
| 2388 |
x, err := c.Do() |
| 2389 |
if err != nil { |
| 2390 |
return err |
| 2391 |
} |
| 2392 |
if err := f(x); err != nil { |
| 2393 |
return err |
| 2394 |
} |
| 2395 |
if x.NextPageToken == "" { |
| 2396 |
return nil |
| 2397 |
} |
| 2398 |
c.PageToken(x.NextPageToken) |
| 2399 |
} |
| 2400 |
} |
| 2401 |
|
| 2402 |
type PartnersSubscriptionsCancelCall struct { |
| 2403 |
s *Service |
| 2404 |
name string |
| 2405 |
cancelsubscriptionrequest *CancelSubscriptionRequest |
| 2406 |
urlParams_ gensupport.URLParams |
| 2407 |
ctx_ context.Context |
| 2408 |
header_ http.Header |
| 2409 |
} |
| 2410 |
|
| 2411 |
|
| 2412 |
|
| 2413 |
|
| 2414 |
|
| 2415 |
|
| 2416 |
|
| 2417 |
func (r *PartnersSubscriptionsService) Cancel(name string, cancelsubscriptionrequest *CancelSubscriptionRequest) *PartnersSubscriptionsCancelCall { |
| 2418 |
c := &PartnersSubscriptionsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 2419 |
c.name = name |
| 2420 |
c.cancelsubscriptionrequest = cancelsubscriptionrequest |
| 2421 |
return c |
| 2422 |
} |
| 2423 |
|
| 2424 |
|
| 2425 |
|
| 2426 |
|
| 2427 |
func (c *PartnersSubscriptionsCancelCall) Fields(s ...googleapi.Field) *PartnersSubscriptionsCancelCall { |
| 2428 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 2429 |
return c |
| 2430 |
} |
| 2431 |
|
| 2432 |
|
| 2433 |
func (c *PartnersSubscriptionsCancelCall) Context(ctx context.Context) *PartnersSubscriptionsCancelCall { |
| 2434 |
c.ctx_ = ctx |
| 2435 |
return c |
| 2436 |
} |
| 2437 |
|
| 2438 |
|
| 2439 |
|
| 2440 |
func (c *PartnersSubscriptionsCancelCall) Header() http.Header { |
| 2441 |
if c.header_ == nil { |
| 2442 |
c.header_ = make(http.Header) |
| 2443 |
} |
| 2444 |
return c.header_ |
| 2445 |
} |
| 2446 |
|
| 2447 |
func (c *PartnersSubscriptionsCancelCall) doRequest(alt string) (*http.Response, error) { |
| 2448 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 2449 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.cancelsubscriptionrequest) |
| 2450 |
if err != nil { |
| 2451 |
return nil, err |
| 2452 |
} |
| 2453 |
c.urlParams_.Set("alt", alt) |
| 2454 |
c.urlParams_.Set("prettyPrint", "false") |
| 2455 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") |
| 2456 |
urls += "?" + c.urlParams_.Encode() |
| 2457 |
req, err := http.NewRequest("POST", urls, body) |
| 2458 |
if err != nil { |
| 2459 |
return nil, err |
| 2460 |
} |
| 2461 |
req.Header = reqHeaders |
| 2462 |
googleapi.Expand(req.URL, map[string]string{ |
| 2463 |
"name": c.name, |
| 2464 |
}) |
| 2465 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.cancel", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 2466 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 2467 |
} |
| 2468 |
|
| 2469 |
|
| 2470 |
|
| 2471 |
|
| 2472 |
|
| 2473 |
|
| 2474 |
|
| 2475 |
func (c *PartnersSubscriptionsCancelCall) Do(opts ...googleapi.CallOption) (*CancelSubscriptionResponse, error) { |
| 2476 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 2477 |
res, err := c.doRequest("json") |
| 2478 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 2479 |
if res.Body != nil { |
| 2480 |
res.Body.Close() |
| 2481 |
} |
| 2482 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 2483 |
Code: res.StatusCode, |
| 2484 |
Header: res.Header, |
| 2485 |
}) |
| 2486 |
} |
| 2487 |
if err != nil { |
| 2488 |
return nil, err |
| 2489 |
} |
| 2490 |
defer googleapi.CloseBody(res) |
| 2491 |
if err := googleapi.CheckResponse(res); err != nil { |
| 2492 |
return nil, gensupport.WrapError(err) |
| 2493 |
} |
| 2494 |
ret := &CancelSubscriptionResponse{ |
| 2495 |
ServerResponse: googleapi.ServerResponse{ |
| 2496 |
Header: res.Header, |
| 2497 |
HTTPStatusCode: res.StatusCode, |
| 2498 |
}, |
| 2499 |
} |
| 2500 |
target := &ret |
| 2501 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 2502 |
if err != nil { |
| 2503 |
return nil, err |
| 2504 |
} |
| 2505 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.cancel", "response", internallog.HTTPResponse(res, b)) |
| 2506 |
return ret, nil |
| 2507 |
} |
| 2508 |
|
| 2509 |
type PartnersSubscriptionsCreateCall struct { |
| 2510 |
s *Service |
| 2511 |
parentid string |
| 2512 |
subscription *Subscription |
| 2513 |
urlParams_ gensupport.URLParams |
| 2514 |
ctx_ context.Context |
| 2515 |
header_ http.Header |
| 2516 |
} |
| 2517 |
|
| 2518 |
|
| 2519 |
|
| 2520 |
|
| 2521 |
|
| 2522 |
|
| 2523 |
|
| 2524 |
func (r *PartnersSubscriptionsService) Create(parentid string, subscription *Subscription) *PartnersSubscriptionsCreateCall { |
| 2525 |
c := &PartnersSubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 2526 |
c.parentid = parentid |
| 2527 |
c.subscription = subscription |
| 2528 |
return c |
| 2529 |
} |
| 2530 |
|
| 2531 |
|
| 2532 |
|
| 2533 |
|
| 2534 |
|
| 2535 |
func (c *PartnersSubscriptionsCreateCall) SubscriptionId(subscriptionId string) *PartnersSubscriptionsCreateCall { |
| 2536 |
c.urlParams_.Set("subscriptionId", subscriptionId) |
| 2537 |
return c |
| 2538 |
} |
| 2539 |
|
| 2540 |
|
| 2541 |
|
| 2542 |
|
| 2543 |
func (c *PartnersSubscriptionsCreateCall) Fields(s ...googleapi.Field) *PartnersSubscriptionsCreateCall { |
| 2544 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 2545 |
return c |
| 2546 |
} |
| 2547 |
|
| 2548 |
|
| 2549 |
func (c *PartnersSubscriptionsCreateCall) Context(ctx context.Context) *PartnersSubscriptionsCreateCall { |
| 2550 |
c.ctx_ = ctx |
| 2551 |
return c |
| 2552 |
} |
| 2553 |
|
| 2554 |
|
| 2555 |
|
| 2556 |
func (c *PartnersSubscriptionsCreateCall) Header() http.Header { |
| 2557 |
if c.header_ == nil { |
| 2558 |
c.header_ = make(http.Header) |
| 2559 |
} |
| 2560 |
return c.header_ |
| 2561 |
} |
| 2562 |
|
| 2563 |
func (c *PartnersSubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) { |
| 2564 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 2565 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subscription) |
| 2566 |
if err != nil { |
| 2567 |
return nil, err |
| 2568 |
} |
| 2569 |
c.urlParams_.Set("alt", alt) |
| 2570 |
c.urlParams_.Set("prettyPrint", "false") |
| 2571 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/subscriptions") |
| 2572 |
urls += "?" + c.urlParams_.Encode() |
| 2573 |
req, err := http.NewRequest("POST", urls, body) |
| 2574 |
if err != nil { |
| 2575 |
return nil, err |
| 2576 |
} |
| 2577 |
req.Header = reqHeaders |
| 2578 |
googleapi.Expand(req.URL, map[string]string{ |
| 2579 |
"parent": c.parentid, |
| 2580 |
}) |
| 2581 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 2582 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 2583 |
} |
| 2584 |
|
| 2585 |
|
| 2586 |
|
| 2587 |
|
| 2588 |
|
| 2589 |
|
| 2590 |
func (c *PartnersSubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*Subscription, error) { |
| 2591 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 2592 |
res, err := c.doRequest("json") |
| 2593 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 2594 |
if res.Body != nil { |
| 2595 |
res.Body.Close() |
| 2596 |
} |
| 2597 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 2598 |
Code: res.StatusCode, |
| 2599 |
Header: res.Header, |
| 2600 |
}) |
| 2601 |
} |
| 2602 |
if err != nil { |
| 2603 |
return nil, err |
| 2604 |
} |
| 2605 |
defer googleapi.CloseBody(res) |
| 2606 |
if err := googleapi.CheckResponse(res); err != nil { |
| 2607 |
return nil, gensupport.WrapError(err) |
| 2608 |
} |
| 2609 |
ret := &Subscription{ |
| 2610 |
ServerResponse: googleapi.ServerResponse{ |
| 2611 |
Header: res.Header, |
| 2612 |
HTTPStatusCode: res.StatusCode, |
| 2613 |
}, |
| 2614 |
} |
| 2615 |
target := &ret |
| 2616 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 2617 |
if err != nil { |
| 2618 |
return nil, err |
| 2619 |
} |
| 2620 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.create", "response", internallog.HTTPResponse(res, b)) |
| 2621 |
return ret, nil |
| 2622 |
} |
| 2623 |
|
| 2624 |
type PartnersSubscriptionsEntitleCall struct { |
| 2625 |
s *Service |
| 2626 |
name string |
| 2627 |
entitlesubscriptionrequest *EntitleSubscriptionRequest |
| 2628 |
urlParams_ gensupport.URLParams |
| 2629 |
ctx_ context.Context |
| 2630 |
header_ http.Header |
| 2631 |
} |
| 2632 |
|
| 2633 |
|
| 2634 |
|
| 2635 |
|
| 2636 |
|
| 2637 |
|
| 2638 |
|
| 2639 |
|
| 2640 |
func (r *PartnersSubscriptionsService) Entitle(name string, entitlesubscriptionrequest *EntitleSubscriptionRequest) *PartnersSubscriptionsEntitleCall { |
| 2641 |
c := &PartnersSubscriptionsEntitleCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 2642 |
c.name = name |
| 2643 |
c.entitlesubscriptionrequest = entitlesubscriptionrequest |
| 2644 |
return c |
| 2645 |
} |
| 2646 |
|
| 2647 |
|
| 2648 |
|
| 2649 |
|
| 2650 |
func (c *PartnersSubscriptionsEntitleCall) Fields(s ...googleapi.Field) *PartnersSubscriptionsEntitleCall { |
| 2651 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 2652 |
return c |
| 2653 |
} |
| 2654 |
|
| 2655 |
|
| 2656 |
func (c *PartnersSubscriptionsEntitleCall) Context(ctx context.Context) *PartnersSubscriptionsEntitleCall { |
| 2657 |
c.ctx_ = ctx |
| 2658 |
return c |
| 2659 |
} |
| 2660 |
|
| 2661 |
|
| 2662 |
|
| 2663 |
func (c *PartnersSubscriptionsEntitleCall) Header() http.Header { |
| 2664 |
if c.header_ == nil { |
| 2665 |
c.header_ = make(http.Header) |
| 2666 |
} |
| 2667 |
return c.header_ |
| 2668 |
} |
| 2669 |
|
| 2670 |
func (c *PartnersSubscriptionsEntitleCall) doRequest(alt string) (*http.Response, error) { |
| 2671 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 2672 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.entitlesubscriptionrequest) |
| 2673 |
if err != nil { |
| 2674 |
return nil, err |
| 2675 |
} |
| 2676 |
c.urlParams_.Set("alt", alt) |
| 2677 |
c.urlParams_.Set("prettyPrint", "false") |
| 2678 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:entitle") |
| 2679 |
urls += "?" + c.urlParams_.Encode() |
| 2680 |
req, err := http.NewRequest("POST", urls, body) |
| 2681 |
if err != nil { |
| 2682 |
return nil, err |
| 2683 |
} |
| 2684 |
req.Header = reqHeaders |
| 2685 |
googleapi.Expand(req.URL, map[string]string{ |
| 2686 |
"name": c.name, |
| 2687 |
}) |
| 2688 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.entitle", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 2689 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 2690 |
} |
| 2691 |
|
| 2692 |
|
| 2693 |
|
| 2694 |
|
| 2695 |
|
| 2696 |
|
| 2697 |
|
| 2698 |
func (c *PartnersSubscriptionsEntitleCall) Do(opts ...googleapi.CallOption) (*EntitleSubscriptionResponse, error) { |
| 2699 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 2700 |
res, err := c.doRequest("json") |
| 2701 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 2702 |
if res.Body != nil { |
| 2703 |
res.Body.Close() |
| 2704 |
} |
| 2705 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 2706 |
Code: res.StatusCode, |
| 2707 |
Header: res.Header, |
| 2708 |
}) |
| 2709 |
} |
| 2710 |
if err != nil { |
| 2711 |
return nil, err |
| 2712 |
} |
| 2713 |
defer googleapi.CloseBody(res) |
| 2714 |
if err := googleapi.CheckResponse(res); err != nil { |
| 2715 |
return nil, gensupport.WrapError(err) |
| 2716 |
} |
| 2717 |
ret := &EntitleSubscriptionResponse{ |
| 2718 |
ServerResponse: googleapi.ServerResponse{ |
| 2719 |
Header: res.Header, |
| 2720 |
HTTPStatusCode: res.StatusCode, |
| 2721 |
}, |
| 2722 |
} |
| 2723 |
target := &ret |
| 2724 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 2725 |
if err != nil { |
| 2726 |
return nil, err |
| 2727 |
} |
| 2728 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.entitle", "response", internallog.HTTPResponse(res, b)) |
| 2729 |
return ret, nil |
| 2730 |
} |
| 2731 |
|
| 2732 |
type PartnersSubscriptionsExtendCall struct { |
| 2733 |
s *Service |
| 2734 |
name string |
| 2735 |
extendsubscriptionrequest *ExtendSubscriptionRequest |
| 2736 |
urlParams_ gensupport.URLParams |
| 2737 |
ctx_ context.Context |
| 2738 |
header_ http.Header |
| 2739 |
} |
| 2740 |
|
| 2741 |
|
| 2742 |
|
| 2743 |
|
| 2744 |
|
| 2745 |
|
| 2746 |
|
| 2747 |
|
| 2748 |
func (r *PartnersSubscriptionsService) Extend(name string, extendsubscriptionrequest *ExtendSubscriptionRequest) *PartnersSubscriptionsExtendCall { |
| 2749 |
c := &PartnersSubscriptionsExtendCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 2750 |
c.name = name |
| 2751 |
c.extendsubscriptionrequest = extendsubscriptionrequest |
| 2752 |
return c |
| 2753 |
} |
| 2754 |
|
| 2755 |
|
| 2756 |
|
| 2757 |
|
| 2758 |
func (c *PartnersSubscriptionsExtendCall) Fields(s ...googleapi.Field) *PartnersSubscriptionsExtendCall { |
| 2759 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 2760 |
return c |
| 2761 |
} |
| 2762 |
|
| 2763 |
|
| 2764 |
func (c *PartnersSubscriptionsExtendCall) Context(ctx context.Context) *PartnersSubscriptionsExtendCall { |
| 2765 |
c.ctx_ = ctx |
| 2766 |
return c |
| 2767 |
} |
| 2768 |
|
| 2769 |
|
| 2770 |
|
| 2771 |
func (c *PartnersSubscriptionsExtendCall) Header() http.Header { |
| 2772 |
if c.header_ == nil { |
| 2773 |
c.header_ = make(http.Header) |
| 2774 |
} |
| 2775 |
return c.header_ |
| 2776 |
} |
| 2777 |
|
| 2778 |
func (c *PartnersSubscriptionsExtendCall) doRequest(alt string) (*http.Response, error) { |
| 2779 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 2780 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.extendsubscriptionrequest) |
| 2781 |
if err != nil { |
| 2782 |
return nil, err |
| 2783 |
} |
| 2784 |
c.urlParams_.Set("alt", alt) |
| 2785 |
c.urlParams_.Set("prettyPrint", "false") |
| 2786 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:extend") |
| 2787 |
urls += "?" + c.urlParams_.Encode() |
| 2788 |
req, err := http.NewRequest("POST", urls, body) |
| 2789 |
if err != nil { |
| 2790 |
return nil, err |
| 2791 |
} |
| 2792 |
req.Header = reqHeaders |
| 2793 |
googleapi.Expand(req.URL, map[string]string{ |
| 2794 |
"name": c.name, |
| 2795 |
}) |
| 2796 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.extend", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 2797 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 2798 |
} |
| 2799 |
|
| 2800 |
|
| 2801 |
|
| 2802 |
|
| 2803 |
|
| 2804 |
|
| 2805 |
|
| 2806 |
func (c *PartnersSubscriptionsExtendCall) Do(opts ...googleapi.CallOption) (*ExtendSubscriptionResponse, error) { |
| 2807 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 2808 |
res, err := c.doRequest("json") |
| 2809 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 2810 |
if res.Body != nil { |
| 2811 |
res.Body.Close() |
| 2812 |
} |
| 2813 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 2814 |
Code: res.StatusCode, |
| 2815 |
Header: res.Header, |
| 2816 |
}) |
| 2817 |
} |
| 2818 |
if err != nil { |
| 2819 |
return nil, err |
| 2820 |
} |
| 2821 |
defer googleapi.CloseBody(res) |
| 2822 |
if err := googleapi.CheckResponse(res); err != nil { |
| 2823 |
return nil, gensupport.WrapError(err) |
| 2824 |
} |
| 2825 |
ret := &ExtendSubscriptionResponse{ |
| 2826 |
ServerResponse: googleapi.ServerResponse{ |
| 2827 |
Header: res.Header, |
| 2828 |
HTTPStatusCode: res.StatusCode, |
| 2829 |
}, |
| 2830 |
} |
| 2831 |
target := &ret |
| 2832 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 2833 |
if err != nil { |
| 2834 |
return nil, err |
| 2835 |
} |
| 2836 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.extend", "response", internallog.HTTPResponse(res, b)) |
| 2837 |
return ret, nil |
| 2838 |
} |
| 2839 |
|
| 2840 |
type PartnersSubscriptionsGetCall struct { |
| 2841 |
s *Service |
| 2842 |
name string |
| 2843 |
urlParams_ gensupport.URLParams |
| 2844 |
ifNoneMatch_ string |
| 2845 |
ctx_ context.Context |
| 2846 |
header_ http.Header |
| 2847 |
} |
| 2848 |
|
| 2849 |
|
| 2850 |
|
| 2851 |
|
| 2852 |
|
| 2853 |
|
| 2854 |
func (r *PartnersSubscriptionsService) Get(name string) *PartnersSubscriptionsGetCall { |
| 2855 |
c := &PartnersSubscriptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 2856 |
c.name = name |
| 2857 |
return c |
| 2858 |
} |
| 2859 |
|
| 2860 |
|
| 2861 |
|
| 2862 |
|
| 2863 |
func (c *PartnersSubscriptionsGetCall) Fields(s ...googleapi.Field) *PartnersSubscriptionsGetCall { |
| 2864 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 2865 |
return c |
| 2866 |
} |
| 2867 |
|
| 2868 |
|
| 2869 |
|
| 2870 |
|
| 2871 |
func (c *PartnersSubscriptionsGetCall) IfNoneMatch(entityTag string) *PartnersSubscriptionsGetCall { |
| 2872 |
c.ifNoneMatch_ = entityTag |
| 2873 |
return c |
| 2874 |
} |
| 2875 |
|
| 2876 |
|
| 2877 |
func (c *PartnersSubscriptionsGetCall) Context(ctx context.Context) *PartnersSubscriptionsGetCall { |
| 2878 |
c.ctx_ = ctx |
| 2879 |
return c |
| 2880 |
} |
| 2881 |
|
| 2882 |
|
| 2883 |
|
| 2884 |
func (c *PartnersSubscriptionsGetCall) Header() http.Header { |
| 2885 |
if c.header_ == nil { |
| 2886 |
c.header_ = make(http.Header) |
| 2887 |
} |
| 2888 |
return c.header_ |
| 2889 |
} |
| 2890 |
|
| 2891 |
func (c *PartnersSubscriptionsGetCall) doRequest(alt string) (*http.Response, error) { |
| 2892 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 2893 |
if c.ifNoneMatch_ != "" { |
| 2894 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 2895 |
} |
| 2896 |
c.urlParams_.Set("alt", alt) |
| 2897 |
c.urlParams_.Set("prettyPrint", "false") |
| 2898 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 2899 |
urls += "?" + c.urlParams_.Encode() |
| 2900 |
req, err := http.NewRequest("GET", urls, nil) |
| 2901 |
if err != nil { |
| 2902 |
return nil, err |
| 2903 |
} |
| 2904 |
req.Header = reqHeaders |
| 2905 |
googleapi.Expand(req.URL, map[string]string{ |
| 2906 |
"name": c.name, |
| 2907 |
}) |
| 2908 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.get", "request", internallog.HTTPRequest(req, nil)) |
| 2909 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 2910 |
} |
| 2911 |
|
| 2912 |
|
| 2913 |
|
| 2914 |
|
| 2915 |
|
| 2916 |
|
| 2917 |
func (c *PartnersSubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*Subscription, error) { |
| 2918 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 2919 |
res, err := c.doRequest("json") |
| 2920 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 2921 |
if res.Body != nil { |
| 2922 |
res.Body.Close() |
| 2923 |
} |
| 2924 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 2925 |
Code: res.StatusCode, |
| 2926 |
Header: res.Header, |
| 2927 |
}) |
| 2928 |
} |
| 2929 |
if err != nil { |
| 2930 |
return nil, err |
| 2931 |
} |
| 2932 |
defer googleapi.CloseBody(res) |
| 2933 |
if err := googleapi.CheckResponse(res); err != nil { |
| 2934 |
return nil, gensupport.WrapError(err) |
| 2935 |
} |
| 2936 |
ret := &Subscription{ |
| 2937 |
ServerResponse: googleapi.ServerResponse{ |
| 2938 |
Header: res.Header, |
| 2939 |
HTTPStatusCode: res.StatusCode, |
| 2940 |
}, |
| 2941 |
} |
| 2942 |
target := &ret |
| 2943 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 2944 |
if err != nil { |
| 2945 |
return nil, err |
| 2946 |
} |
| 2947 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.get", "response", internallog.HTTPResponse(res, b)) |
| 2948 |
return ret, nil |
| 2949 |
} |
| 2950 |
|
| 2951 |
type PartnersSubscriptionsProvisionCall struct { |
| 2952 |
s *Service |
| 2953 |
parentid string |
| 2954 |
subscription *Subscription |
| 2955 |
urlParams_ gensupport.URLParams |
| 2956 |
ctx_ context.Context |
| 2957 |
header_ http.Header |
| 2958 |
} |
| 2959 |
|
| 2960 |
|
| 2961 |
|
| 2962 |
|
| 2963 |
|
| 2964 |
|
| 2965 |
|
| 2966 |
|
| 2967 |
|
| 2968 |
func (r *PartnersSubscriptionsService) Provision(parentid string, subscription *Subscription) *PartnersSubscriptionsProvisionCall { |
| 2969 |
c := &PartnersSubscriptionsProvisionCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 2970 |
c.parentid = parentid |
| 2971 |
c.subscription = subscription |
| 2972 |
return c |
| 2973 |
} |
| 2974 |
|
| 2975 |
|
| 2976 |
|
| 2977 |
|
| 2978 |
func (c *PartnersSubscriptionsProvisionCall) CycleOptionsInitialCycleDurationCount(cycleOptionsInitialCycleDurationCount int64) *PartnersSubscriptionsProvisionCall { |
| 2979 |
c.urlParams_.Set("cycleOptions.initialCycleDuration.count", fmt.Sprint(cycleOptionsInitialCycleDurationCount)) |
| 2980 |
return c |
| 2981 |
} |
| 2982 |
|
| 2983 |
|
| 2984 |
|
| 2985 |
|
| 2986 |
|
| 2987 |
|
| 2988 |
|
| 2989 |
|
| 2990 |
|
| 2991 |
|
| 2992 |
|
| 2993 |
|
| 2994 |
|
| 2995 |
func (c *PartnersSubscriptionsProvisionCall) CycleOptionsInitialCycleDurationUnit(cycleOptionsInitialCycleDurationUnit string) *PartnersSubscriptionsProvisionCall { |
| 2996 |
c.urlParams_.Set("cycleOptions.initialCycleDuration.unit", cycleOptionsInitialCycleDurationUnit) |
| 2997 |
return c |
| 2998 |
} |
| 2999 |
|
| 3000 |
|
| 3001 |
|
| 3002 |
|
| 3003 |
|
| 3004 |
func (c *PartnersSubscriptionsProvisionCall) SubscriptionId(subscriptionId string) *PartnersSubscriptionsProvisionCall { |
| 3005 |
c.urlParams_.Set("subscriptionId", subscriptionId) |
| 3006 |
return c |
| 3007 |
} |
| 3008 |
|
| 3009 |
|
| 3010 |
|
| 3011 |
|
| 3012 |
func (c *PartnersSubscriptionsProvisionCall) Fields(s ...googleapi.Field) *PartnersSubscriptionsProvisionCall { |
| 3013 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3014 |
return c |
| 3015 |
} |
| 3016 |
|
| 3017 |
|
| 3018 |
func (c *PartnersSubscriptionsProvisionCall) Context(ctx context.Context) *PartnersSubscriptionsProvisionCall { |
| 3019 |
c.ctx_ = ctx |
| 3020 |
return c |
| 3021 |
} |
| 3022 |
|
| 3023 |
|
| 3024 |
|
| 3025 |
func (c *PartnersSubscriptionsProvisionCall) Header() http.Header { |
| 3026 |
if c.header_ == nil { |
| 3027 |
c.header_ = make(http.Header) |
| 3028 |
} |
| 3029 |
return c.header_ |
| 3030 |
} |
| 3031 |
|
| 3032 |
func (c *PartnersSubscriptionsProvisionCall) doRequest(alt string) (*http.Response, error) { |
| 3033 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 3034 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subscription) |
| 3035 |
if err != nil { |
| 3036 |
return nil, err |
| 3037 |
} |
| 3038 |
c.urlParams_.Set("alt", alt) |
| 3039 |
c.urlParams_.Set("prettyPrint", "false") |
| 3040 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/subscriptions:provision") |
| 3041 |
urls += "?" + c.urlParams_.Encode() |
| 3042 |
req, err := http.NewRequest("POST", urls, body) |
| 3043 |
if err != nil { |
| 3044 |
return nil, err |
| 3045 |
} |
| 3046 |
req.Header = reqHeaders |
| 3047 |
googleapi.Expand(req.URL, map[string]string{ |
| 3048 |
"parent": c.parentid, |
| 3049 |
}) |
| 3050 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.provision", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 3051 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3052 |
} |
| 3053 |
|
| 3054 |
|
| 3055 |
|
| 3056 |
|
| 3057 |
|
| 3058 |
|
| 3059 |
func (c *PartnersSubscriptionsProvisionCall) Do(opts ...googleapi.CallOption) (*Subscription, error) { |
| 3060 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 3061 |
res, err := c.doRequest("json") |
| 3062 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 3063 |
if res.Body != nil { |
| 3064 |
res.Body.Close() |
| 3065 |
} |
| 3066 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 3067 |
Code: res.StatusCode, |
| 3068 |
Header: res.Header, |
| 3069 |
}) |
| 3070 |
} |
| 3071 |
if err != nil { |
| 3072 |
return nil, err |
| 3073 |
} |
| 3074 |
defer googleapi.CloseBody(res) |
| 3075 |
if err := googleapi.CheckResponse(res); err != nil { |
| 3076 |
return nil, gensupport.WrapError(err) |
| 3077 |
} |
| 3078 |
ret := &Subscription{ |
| 3079 |
ServerResponse: googleapi.ServerResponse{ |
| 3080 |
Header: res.Header, |
| 3081 |
HTTPStatusCode: res.StatusCode, |
| 3082 |
}, |
| 3083 |
} |
| 3084 |
target := &ret |
| 3085 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 3086 |
if err != nil { |
| 3087 |
return nil, err |
| 3088 |
} |
| 3089 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.provision", "response", internallog.HTTPResponse(res, b)) |
| 3090 |
return ret, nil |
| 3091 |
} |
| 3092 |
|
| 3093 |
type PartnersSubscriptionsResumeCall struct { |
| 3094 |
s *Service |
| 3095 |
name string |
| 3096 |
resumesubscriptionrequest *ResumeSubscriptionRequest |
| 3097 |
urlParams_ gensupport.URLParams |
| 3098 |
ctx_ context.Context |
| 3099 |
header_ http.Header |
| 3100 |
} |
| 3101 |
|
| 3102 |
|
| 3103 |
|
| 3104 |
|
| 3105 |
|
| 3106 |
|
| 3107 |
|
| 3108 |
func (r *PartnersSubscriptionsService) Resume(name string, resumesubscriptionrequest *ResumeSubscriptionRequest) *PartnersSubscriptionsResumeCall { |
| 3109 |
c := &PartnersSubscriptionsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 3110 |
c.name = name |
| 3111 |
c.resumesubscriptionrequest = resumesubscriptionrequest |
| 3112 |
return c |
| 3113 |
} |
| 3114 |
|
| 3115 |
|
| 3116 |
|
| 3117 |
|
| 3118 |
func (c *PartnersSubscriptionsResumeCall) Fields(s ...googleapi.Field) *PartnersSubscriptionsResumeCall { |
| 3119 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3120 |
return c |
| 3121 |
} |
| 3122 |
|
| 3123 |
|
| 3124 |
func (c *PartnersSubscriptionsResumeCall) Context(ctx context.Context) *PartnersSubscriptionsResumeCall { |
| 3125 |
c.ctx_ = ctx |
| 3126 |
return c |
| 3127 |
} |
| 3128 |
|
| 3129 |
|
| 3130 |
|
| 3131 |
func (c *PartnersSubscriptionsResumeCall) Header() http.Header { |
| 3132 |
if c.header_ == nil { |
| 3133 |
c.header_ = make(http.Header) |
| 3134 |
} |
| 3135 |
return c.header_ |
| 3136 |
} |
| 3137 |
|
| 3138 |
func (c *PartnersSubscriptionsResumeCall) doRequest(alt string) (*http.Response, error) { |
| 3139 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 3140 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resumesubscriptionrequest) |
| 3141 |
if err != nil { |
| 3142 |
return nil, err |
| 3143 |
} |
| 3144 |
c.urlParams_.Set("alt", alt) |
| 3145 |
c.urlParams_.Set("prettyPrint", "false") |
| 3146 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resume") |
| 3147 |
urls += "?" + c.urlParams_.Encode() |
| 3148 |
req, err := http.NewRequest("POST", urls, body) |
| 3149 |
if err != nil { |
| 3150 |
return nil, err |
| 3151 |
} |
| 3152 |
req.Header = reqHeaders |
| 3153 |
googleapi.Expand(req.URL, map[string]string{ |
| 3154 |
"name": c.name, |
| 3155 |
}) |
| 3156 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.resume", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 3157 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3158 |
} |
| 3159 |
|
| 3160 |
|
| 3161 |
|
| 3162 |
|
| 3163 |
|
| 3164 |
|
| 3165 |
|
| 3166 |
func (c *PartnersSubscriptionsResumeCall) Do(opts ...googleapi.CallOption) (*ResumeSubscriptionResponse, error) { |
| 3167 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 3168 |
res, err := c.doRequest("json") |
| 3169 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 3170 |
if res.Body != nil { |
| 3171 |
res.Body.Close() |
| 3172 |
} |
| 3173 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 3174 |
Code: res.StatusCode, |
| 3175 |
Header: res.Header, |
| 3176 |
}) |
| 3177 |
} |
| 3178 |
if err != nil { |
| 3179 |
return nil, err |
| 3180 |
} |
| 3181 |
defer googleapi.CloseBody(res) |
| 3182 |
if err := googleapi.CheckResponse(res); err != nil { |
| 3183 |
return nil, gensupport.WrapError(err) |
| 3184 |
} |
| 3185 |
ret := &ResumeSubscriptionResponse{ |
| 3186 |
ServerResponse: googleapi.ServerResponse{ |
| 3187 |
Header: res.Header, |
| 3188 |
HTTPStatusCode: res.StatusCode, |
| 3189 |
}, |
| 3190 |
} |
| 3191 |
target := &ret |
| 3192 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 3193 |
if err != nil { |
| 3194 |
return nil, err |
| 3195 |
} |
| 3196 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.resume", "response", internallog.HTTPResponse(res, b)) |
| 3197 |
return ret, nil |
| 3198 |
} |
| 3199 |
|
| 3200 |
type PartnersSubscriptionsSuspendCall struct { |
| 3201 |
s *Service |
| 3202 |
name string |
| 3203 |
suspendsubscriptionrequest *SuspendSubscriptionRequest |
| 3204 |
urlParams_ gensupport.URLParams |
| 3205 |
ctx_ context.Context |
| 3206 |
header_ http.Header |
| 3207 |
} |
| 3208 |
|
| 3209 |
|
| 3210 |
|
| 3211 |
|
| 3212 |
|
| 3213 |
|
| 3214 |
|
| 3215 |
func (r *PartnersSubscriptionsService) Suspend(name string, suspendsubscriptionrequest *SuspendSubscriptionRequest) *PartnersSubscriptionsSuspendCall { |
| 3216 |
c := &PartnersSubscriptionsSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 3217 |
c.name = name |
| 3218 |
c.suspendsubscriptionrequest = suspendsubscriptionrequest |
| 3219 |
return c |
| 3220 |
} |
| 3221 |
|
| 3222 |
|
| 3223 |
|
| 3224 |
|
| 3225 |
func (c *PartnersSubscriptionsSuspendCall) Fields(s ...googleapi.Field) *PartnersSubscriptionsSuspendCall { |
| 3226 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3227 |
return c |
| 3228 |
} |
| 3229 |
|
| 3230 |
|
| 3231 |
func (c *PartnersSubscriptionsSuspendCall) Context(ctx context.Context) *PartnersSubscriptionsSuspendCall { |
| 3232 |
c.ctx_ = ctx |
| 3233 |
return c |
| 3234 |
} |
| 3235 |
|
| 3236 |
|
| 3237 |
|
| 3238 |
func (c *PartnersSubscriptionsSuspendCall) Header() http.Header { |
| 3239 |
if c.header_ == nil { |
| 3240 |
c.header_ = make(http.Header) |
| 3241 |
} |
| 3242 |
return c.header_ |
| 3243 |
} |
| 3244 |
|
| 3245 |
func (c *PartnersSubscriptionsSuspendCall) doRequest(alt string) (*http.Response, error) { |
| 3246 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 3247 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.suspendsubscriptionrequest) |
| 3248 |
if err != nil { |
| 3249 |
return nil, err |
| 3250 |
} |
| 3251 |
c.urlParams_.Set("alt", alt) |
| 3252 |
c.urlParams_.Set("prettyPrint", "false") |
| 3253 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:suspend") |
| 3254 |
urls += "?" + c.urlParams_.Encode() |
| 3255 |
req, err := http.NewRequest("POST", urls, body) |
| 3256 |
if err != nil { |
| 3257 |
return nil, err |
| 3258 |
} |
| 3259 |
req.Header = reqHeaders |
| 3260 |
googleapi.Expand(req.URL, map[string]string{ |
| 3261 |
"name": c.name, |
| 3262 |
}) |
| 3263 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.suspend", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 3264 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3265 |
} |
| 3266 |
|
| 3267 |
|
| 3268 |
|
| 3269 |
|
| 3270 |
|
| 3271 |
|
| 3272 |
|
| 3273 |
func (c *PartnersSubscriptionsSuspendCall) Do(opts ...googleapi.CallOption) (*SuspendSubscriptionResponse, error) { |
| 3274 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 3275 |
res, err := c.doRequest("json") |
| 3276 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 3277 |
if res.Body != nil { |
| 3278 |
res.Body.Close() |
| 3279 |
} |
| 3280 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 3281 |
Code: res.StatusCode, |
| 3282 |
Header: res.Header, |
| 3283 |
}) |
| 3284 |
} |
| 3285 |
if err != nil { |
| 3286 |
return nil, err |
| 3287 |
} |
| 3288 |
defer googleapi.CloseBody(res) |
| 3289 |
if err := googleapi.CheckResponse(res); err != nil { |
| 3290 |
return nil, gensupport.WrapError(err) |
| 3291 |
} |
| 3292 |
ret := &SuspendSubscriptionResponse{ |
| 3293 |
ServerResponse: googleapi.ServerResponse{ |
| 3294 |
Header: res.Header, |
| 3295 |
HTTPStatusCode: res.StatusCode, |
| 3296 |
}, |
| 3297 |
} |
| 3298 |
target := &ret |
| 3299 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 3300 |
if err != nil { |
| 3301 |
return nil, err |
| 3302 |
} |
| 3303 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.suspend", "response", internallog.HTTPResponse(res, b)) |
| 3304 |
return ret, nil |
| 3305 |
} |
| 3306 |
|
| 3307 |
type PartnersSubscriptionsUndoCancelCall struct { |
| 3308 |
s *Service |
| 3309 |
name string |
| 3310 |
undocancelsubscriptionrequest *UndoCancelSubscriptionRequest |
| 3311 |
urlParams_ gensupport.URLParams |
| 3312 |
ctx_ context.Context |
| 3313 |
header_ http.Header |
| 3314 |
} |
| 3315 |
|
| 3316 |
|
| 3317 |
|
| 3318 |
|
| 3319 |
|
| 3320 |
|
| 3321 |
|
| 3322 |
|
| 3323 |
|
| 3324 |
|
| 3325 |
func (r *PartnersSubscriptionsService) UndoCancel(name string, undocancelsubscriptionrequest *UndoCancelSubscriptionRequest) *PartnersSubscriptionsUndoCancelCall { |
| 3326 |
c := &PartnersSubscriptionsUndoCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 3327 |
c.name = name |
| 3328 |
c.undocancelsubscriptionrequest = undocancelsubscriptionrequest |
| 3329 |
return c |
| 3330 |
} |
| 3331 |
|
| 3332 |
|
| 3333 |
|
| 3334 |
|
| 3335 |
func (c *PartnersSubscriptionsUndoCancelCall) Fields(s ...googleapi.Field) *PartnersSubscriptionsUndoCancelCall { |
| 3336 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3337 |
return c |
| 3338 |
} |
| 3339 |
|
| 3340 |
|
| 3341 |
func (c *PartnersSubscriptionsUndoCancelCall) Context(ctx context.Context) *PartnersSubscriptionsUndoCancelCall { |
| 3342 |
c.ctx_ = ctx |
| 3343 |
return c |
| 3344 |
} |
| 3345 |
|
| 3346 |
|
| 3347 |
|
| 3348 |
func (c *PartnersSubscriptionsUndoCancelCall) Header() http.Header { |
| 3349 |
if c.header_ == nil { |
| 3350 |
c.header_ = make(http.Header) |
| 3351 |
} |
| 3352 |
return c.header_ |
| 3353 |
} |
| 3354 |
|
| 3355 |
func (c *PartnersSubscriptionsUndoCancelCall) doRequest(alt string) (*http.Response, error) { |
| 3356 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 3357 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.undocancelsubscriptionrequest) |
| 3358 |
if err != nil { |
| 3359 |
return nil, err |
| 3360 |
} |
| 3361 |
c.urlParams_.Set("alt", alt) |
| 3362 |
c.urlParams_.Set("prettyPrint", "false") |
| 3363 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undoCancel") |
| 3364 |
urls += "?" + c.urlParams_.Encode() |
| 3365 |
req, err := http.NewRequest("POST", urls, body) |
| 3366 |
if err != nil { |
| 3367 |
return nil, err |
| 3368 |
} |
| 3369 |
req.Header = reqHeaders |
| 3370 |
googleapi.Expand(req.URL, map[string]string{ |
| 3371 |
"name": c.name, |
| 3372 |
}) |
| 3373 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.undoCancel", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 3374 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3375 |
} |
| 3376 |
|
| 3377 |
|
| 3378 |
|
| 3379 |
|
| 3380 |
|
| 3381 |
|
| 3382 |
|
| 3383 |
func (c *PartnersSubscriptionsUndoCancelCall) Do(opts ...googleapi.CallOption) (*UndoCancelSubscriptionResponse, error) { |
| 3384 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 3385 |
res, err := c.doRequest("json") |
| 3386 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 3387 |
if res.Body != nil { |
| 3388 |
res.Body.Close() |
| 3389 |
} |
| 3390 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 3391 |
Code: res.StatusCode, |
| 3392 |
Header: res.Header, |
| 3393 |
}) |
| 3394 |
} |
| 3395 |
if err != nil { |
| 3396 |
return nil, err |
| 3397 |
} |
| 3398 |
defer googleapi.CloseBody(res) |
| 3399 |
if err := googleapi.CheckResponse(res); err != nil { |
| 3400 |
return nil, gensupport.WrapError(err) |
| 3401 |
} |
| 3402 |
ret := &UndoCancelSubscriptionResponse{ |
| 3403 |
ServerResponse: googleapi.ServerResponse{ |
| 3404 |
Header: res.Header, |
| 3405 |
HTTPStatusCode: res.StatusCode, |
| 3406 |
}, |
| 3407 |
} |
| 3408 |
target := &ret |
| 3409 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 3410 |
if err != nil { |
| 3411 |
return nil, err |
| 3412 |
} |
| 3413 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.undoCancel", "response", internallog.HTTPResponse(res, b)) |
| 3414 |
return ret, nil |
| 3415 |
} |
| 3416 |
|
| 3417 |
type PartnersSubscriptionsLineItemsPatchCall struct { |
| 3418 |
s *Service |
| 3419 |
name string |
| 3420 |
subscriptionlineitem *SubscriptionLineItem |
| 3421 |
urlParams_ gensupport.URLParams |
| 3422 |
ctx_ context.Context |
| 3423 |
header_ http.Header |
| 3424 |
} |
| 3425 |
|
| 3426 |
|
| 3427 |
|
| 3428 |
|
| 3429 |
|
| 3430 |
|
| 3431 |
func (r *PartnersSubscriptionsLineItemsService) Patch(name string, subscriptionlineitem *SubscriptionLineItem) *PartnersSubscriptionsLineItemsPatchCall { |
| 3432 |
c := &PartnersSubscriptionsLineItemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 3433 |
c.name = name |
| 3434 |
c.subscriptionlineitem = subscriptionlineitem |
| 3435 |
return c |
| 3436 |
} |
| 3437 |
|
| 3438 |
|
| 3439 |
|
| 3440 |
|
| 3441 |
|
| 3442 |
func (c *PartnersSubscriptionsLineItemsPatchCall) UpdateMask(updateMask string) *PartnersSubscriptionsLineItemsPatchCall { |
| 3443 |
c.urlParams_.Set("updateMask", updateMask) |
| 3444 |
return c |
| 3445 |
} |
| 3446 |
|
| 3447 |
|
| 3448 |
|
| 3449 |
|
| 3450 |
func (c *PartnersSubscriptionsLineItemsPatchCall) Fields(s ...googleapi.Field) *PartnersSubscriptionsLineItemsPatchCall { |
| 3451 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3452 |
return c |
| 3453 |
} |
| 3454 |
|
| 3455 |
|
| 3456 |
func (c *PartnersSubscriptionsLineItemsPatchCall) Context(ctx context.Context) *PartnersSubscriptionsLineItemsPatchCall { |
| 3457 |
c.ctx_ = ctx |
| 3458 |
return c |
| 3459 |
} |
| 3460 |
|
| 3461 |
|
| 3462 |
|
| 3463 |
func (c *PartnersSubscriptionsLineItemsPatchCall) Header() http.Header { |
| 3464 |
if c.header_ == nil { |
| 3465 |
c.header_ = make(http.Header) |
| 3466 |
} |
| 3467 |
return c.header_ |
| 3468 |
} |
| 3469 |
|
| 3470 |
func (c *PartnersSubscriptionsLineItemsPatchCall) doRequest(alt string) (*http.Response, error) { |
| 3471 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 3472 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subscriptionlineitem) |
| 3473 |
if err != nil { |
| 3474 |
return nil, err |
| 3475 |
} |
| 3476 |
c.urlParams_.Set("alt", alt) |
| 3477 |
c.urlParams_.Set("prettyPrint", "false") |
| 3478 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 3479 |
urls += "?" + c.urlParams_.Encode() |
| 3480 |
req, err := http.NewRequest("PATCH", urls, body) |
| 3481 |
if err != nil { |
| 3482 |
return nil, err |
| 3483 |
} |
| 3484 |
req.Header = reqHeaders |
| 3485 |
googleapi.Expand(req.URL, map[string]string{ |
| 3486 |
"name": c.name, |
| 3487 |
}) |
| 3488 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.lineItems.patch", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 3489 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3490 |
} |
| 3491 |
|
| 3492 |
|
| 3493 |
|
| 3494 |
|
| 3495 |
|
| 3496 |
|
| 3497 |
|
| 3498 |
func (c *PartnersSubscriptionsLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*SubscriptionLineItem, error) { |
| 3499 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 3500 |
res, err := c.doRequest("json") |
| 3501 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 3502 |
if res.Body != nil { |
| 3503 |
res.Body.Close() |
| 3504 |
} |
| 3505 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 3506 |
Code: res.StatusCode, |
| 3507 |
Header: res.Header, |
| 3508 |
}) |
| 3509 |
} |
| 3510 |
if err != nil { |
| 3511 |
return nil, err |
| 3512 |
} |
| 3513 |
defer googleapi.CloseBody(res) |
| 3514 |
if err := googleapi.CheckResponse(res); err != nil { |
| 3515 |
return nil, gensupport.WrapError(err) |
| 3516 |
} |
| 3517 |
ret := &SubscriptionLineItem{ |
| 3518 |
ServerResponse: googleapi.ServerResponse{ |
| 3519 |
Header: res.Header, |
| 3520 |
HTTPStatusCode: res.StatusCode, |
| 3521 |
}, |
| 3522 |
} |
| 3523 |
target := &ret |
| 3524 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 3525 |
if err != nil { |
| 3526 |
return nil, err |
| 3527 |
} |
| 3528 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.subscriptions.lineItems.patch", "response", internallog.HTTPResponse(res, b)) |
| 3529 |
return ret, nil |
| 3530 |
} |
| 3531 |
|
| 3532 |
type PartnersUserSessionsGenerateCall struct { |
| 3533 |
s *Service |
| 3534 |
parent string |
| 3535 |
generateusersessionrequest *GenerateUserSessionRequest |
| 3536 |
urlParams_ gensupport.URLParams |
| 3537 |
ctx_ context.Context |
| 3538 |
header_ http.Header |
| 3539 |
} |
| 3540 |
|
| 3541 |
|
| 3542 |
|
| 3543 |
|
| 3544 |
|
| 3545 |
|
| 3546 |
|
| 3547 |
|
| 3548 |
|
| 3549 |
|
| 3550 |
func (r *PartnersUserSessionsService) Generate(parent string, generateusersessionrequest *GenerateUserSessionRequest) *PartnersUserSessionsGenerateCall { |
| 3551 |
c := &PartnersUserSessionsGenerateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 3552 |
c.parent = parent |
| 3553 |
c.generateusersessionrequest = generateusersessionrequest |
| 3554 |
return c |
| 3555 |
} |
| 3556 |
|
| 3557 |
|
| 3558 |
|
| 3559 |
|
| 3560 |
func (c *PartnersUserSessionsGenerateCall) Fields(s ...googleapi.Field) *PartnersUserSessionsGenerateCall { |
| 3561 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3562 |
return c |
| 3563 |
} |
| 3564 |
|
| 3565 |
|
| 3566 |
func (c *PartnersUserSessionsGenerateCall) Context(ctx context.Context) *PartnersUserSessionsGenerateCall { |
| 3567 |
c.ctx_ = ctx |
| 3568 |
return c |
| 3569 |
} |
| 3570 |
|
| 3571 |
|
| 3572 |
|
| 3573 |
func (c *PartnersUserSessionsGenerateCall) Header() http.Header { |
| 3574 |
if c.header_ == nil { |
| 3575 |
c.header_ = make(http.Header) |
| 3576 |
} |
| 3577 |
return c.header_ |
| 3578 |
} |
| 3579 |
|
| 3580 |
func (c *PartnersUserSessionsGenerateCall) doRequest(alt string) (*http.Response, error) { |
| 3581 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 3582 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.generateusersessionrequest) |
| 3583 |
if err != nil { |
| 3584 |
return nil, err |
| 3585 |
} |
| 3586 |
c.urlParams_.Set("alt", alt) |
| 3587 |
c.urlParams_.Set("prettyPrint", "false") |
| 3588 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userSessions:generate") |
| 3589 |
urls += "?" + c.urlParams_.Encode() |
| 3590 |
req, err := http.NewRequest("POST", urls, body) |
| 3591 |
if err != nil { |
| 3592 |
return nil, err |
| 3593 |
} |
| 3594 |
req.Header = reqHeaders |
| 3595 |
googleapi.Expand(req.URL, map[string]string{ |
| 3596 |
"parent": c.parent, |
| 3597 |
}) |
| 3598 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.userSessions.generate", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 3599 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3600 |
} |
| 3601 |
|
| 3602 |
|
| 3603 |
|
| 3604 |
|
| 3605 |
|
| 3606 |
|
| 3607 |
|
| 3608 |
func (c *PartnersUserSessionsGenerateCall) Do(opts ...googleapi.CallOption) (*GenerateUserSessionResponse, error) { |
| 3609 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 3610 |
res, err := c.doRequest("json") |
| 3611 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 3612 |
if res.Body != nil { |
| 3613 |
res.Body.Close() |
| 3614 |
} |
| 3615 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 3616 |
Code: res.StatusCode, |
| 3617 |
Header: res.Header, |
| 3618 |
}) |
| 3619 |
} |
| 3620 |
if err != nil { |
| 3621 |
return nil, err |
| 3622 |
} |
| 3623 |
defer googleapi.CloseBody(res) |
| 3624 |
if err := googleapi.CheckResponse(res); err != nil { |
| 3625 |
return nil, gensupport.WrapError(err) |
| 3626 |
} |
| 3627 |
ret := &GenerateUserSessionResponse{ |
| 3628 |
ServerResponse: googleapi.ServerResponse{ |
| 3629 |
Header: res.Header, |
| 3630 |
HTTPStatusCode: res.StatusCode, |
| 3631 |
}, |
| 3632 |
} |
| 3633 |
target := &ret |
| 3634 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 3635 |
if err != nil { |
| 3636 |
return nil, err |
| 3637 |
} |
| 3638 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "paymentsresellersubscription.partners.userSessions.generate", "response", internallog.HTTPResponse(res, b)) |
| 3639 |
return ret, nil |
| 3640 |
} |