0.0.20241101 • Published 10 months ago

@maxim_mazurok/gapi.client.walletobjects-v1 v0.0.20241101

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

TypeScript typings for Google Wallet API v1

API for issuers to save and manage Google Wallet Objects. For detailed description please check documentation.

Installing

Install typings for Google Wallet API:

npm install @types/gapi.client.walletobjects-v1 --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load(
  'https://walletobjects.googleapis.com/$discovery/rest?version=v1',
  () => {
    // now we can use:
    // gapi.client.walletobjects
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('walletobjects', 'v1', () => {
  // now we can use:
  // gapi.client.walletobjects
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [
    // Private Service: https://www.googleapis.com/auth/wallet_object.issuer
    'https://www.googleapis.com/auth/wallet_object.issuer',
  ],
  immediate = true;
// ...

gapi.auth.authorize(
  {client_id: client_id, scope: scope, immediate: immediate},
  authResult => {
    if (authResult && !authResult.error) {
      /* handle successful authorization */
    } else {
      /* handle authorization error */
    }
  }
);

After that you can use Google Wallet API resources:

/*
Adds a message to the event ticket class referenced by the given class ID.
*/
await gapi.client.walletobjects.eventticketclass.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the event ticket class with the given class ID.
*/
await gapi.client.walletobjects.eventticketclass.get({
  resourceId: 'resourceId',
});

/*
Inserts an event ticket class with the given ID and properties.
*/
await gapi.client.walletobjects.eventticketclass.insert({});

/*
Returns a list of all event ticket classes for a given issuer ID.
*/
await gapi.client.walletobjects.eventticketclass.list({});

/*
Updates the event ticket class referenced by the given class ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.eventticketclass.patch({
  resourceId: 'resourceId',
});

/*
Updates the event ticket class referenced by the given class ID.
*/
await gapi.client.walletobjects.eventticketclass.update({
  resourceId: 'resourceId',
});

/*
Adds a message to the event ticket object referenced by the given object ID.
*/
await gapi.client.walletobjects.eventticketobject.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the event ticket object with the given object ID.
*/
await gapi.client.walletobjects.eventticketobject.get({
  resourceId: 'resourceId',
});

/*
Inserts an event ticket object with the given ID and properties.
*/
await gapi.client.walletobjects.eventticketobject.insert({});

/*
Returns a list of all event ticket objects for a given issuer ID.
*/
await gapi.client.walletobjects.eventticketobject.list({});

/*
Modifies linked offer objects for the event ticket object with the given ID.
*/
await gapi.client.walletobjects.eventticketobject.modifylinkedofferobjects({
  resourceId: 'resourceId',
});

/*
Updates the event ticket object referenced by the given object ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.eventticketobject.patch({
  resourceId: 'resourceId',
});

/*
Updates the event ticket object referenced by the given object ID.
*/
await gapi.client.walletobjects.eventticketobject.update({
  resourceId: 'resourceId',
});

/*
Adds a message to the flight class referenced by the given class ID.
*/
await gapi.client.walletobjects.flightclass.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the flight class with the given class ID.
*/
await gapi.client.walletobjects.flightclass.get({resourceId: 'resourceId'});

/*
Inserts an flight class with the given ID and properties.
*/
await gapi.client.walletobjects.flightclass.insert({});

/*
Returns a list of all flight classes for a given issuer ID.
*/
await gapi.client.walletobjects.flightclass.list({});

/*
Updates the flight class referenced by the given class ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.flightclass.patch({resourceId: 'resourceId'});

/*
Updates the flight class referenced by the given class ID.
*/
await gapi.client.walletobjects.flightclass.update({resourceId: 'resourceId'});

/*
Adds a message to the flight object referenced by the given object ID.
*/
await gapi.client.walletobjects.flightobject.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the flight object with the given object ID.
*/
await gapi.client.walletobjects.flightobject.get({resourceId: 'resourceId'});

/*
Inserts an flight object with the given ID and properties.
*/
await gapi.client.walletobjects.flightobject.insert({});

/*
Returns a list of all flight objects for a given issuer ID.
*/
await gapi.client.walletobjects.flightobject.list({});

/*
Updates the flight object referenced by the given object ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.flightobject.patch({resourceId: 'resourceId'});

/*
Updates the flight object referenced by the given object ID.
*/
await gapi.client.walletobjects.flightobject.update({resourceId: 'resourceId'});

/*
Adds a message to the generic class referenced by the given class ID.
*/
await gapi.client.walletobjects.genericclass.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the generic class with the given class ID.
*/
await gapi.client.walletobjects.genericclass.get({resourceId: 'resourceId'});

/*
Inserts a generic class with the given ID and properties.
*/
await gapi.client.walletobjects.genericclass.insert({});

/*
Returns a list of all generic classes for a given issuer ID.
*/
await gapi.client.walletobjects.genericclass.list({});

/*
Updates the generic class referenced by the given class ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.genericclass.patch({resourceId: 'resourceId'});

/*
Updates the Generic class referenced by the given class ID.
*/
await gapi.client.walletobjects.genericclass.update({resourceId: 'resourceId'});

/*
Adds a message to the generic object referenced by the given object ID.
*/
await gapi.client.walletobjects.genericobject.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the generic object with the given object ID.
*/
await gapi.client.walletobjects.genericobject.get({resourceId: 'resourceId'});

/*
Inserts a generic object with the given ID and properties.
*/
await gapi.client.walletobjects.genericobject.insert({});

/*
Returns a list of all generic objects for a given issuer ID.
*/
await gapi.client.walletobjects.genericobject.list({});

/*
Updates the generic object referenced by the given object ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.genericobject.patch({resourceId: 'resourceId'});

/*
Updates the generic object referenced by the given object ID.
*/
await gapi.client.walletobjects.genericobject.update({
  resourceId: 'resourceId',
});

/*
Adds a message to the gift card class referenced by the given class ID.
*/
await gapi.client.walletobjects.giftcardclass.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the gift card class with the given class ID.
*/
await gapi.client.walletobjects.giftcardclass.get({resourceId: 'resourceId'});

/*
Inserts an gift card class with the given ID and properties.
*/
await gapi.client.walletobjects.giftcardclass.insert({});

/*
Returns a list of all gift card classes for a given issuer ID.
*/
await gapi.client.walletobjects.giftcardclass.list({});

/*
Updates the gift card class referenced by the given class ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.giftcardclass.patch({resourceId: 'resourceId'});

/*
Updates the gift card class referenced by the given class ID.
*/
await gapi.client.walletobjects.giftcardclass.update({
  resourceId: 'resourceId',
});

/*
Adds a message to the gift card object referenced by the given object ID.
*/
await gapi.client.walletobjects.giftcardobject.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the gift card object with the given object ID.
*/
await gapi.client.walletobjects.giftcardobject.get({resourceId: 'resourceId'});

/*
Inserts an gift card object with the given ID and properties.
*/
await gapi.client.walletobjects.giftcardobject.insert({});

/*
Returns a list of all gift card objects for a given issuer ID.
*/
await gapi.client.walletobjects.giftcardobject.list({});

/*
Updates the gift card object referenced by the given object ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.giftcardobject.patch({
  resourceId: 'resourceId',
});

/*
Updates the gift card object referenced by the given object ID.
*/
await gapi.client.walletobjects.giftcardobject.update({
  resourceId: 'resourceId',
});

/*
Returns the issuer with the given issuer ID.
*/
await gapi.client.walletobjects.issuer.get({resourceId: 'resourceId'});

/*
Inserts an issuer with the given ID and properties.
*/
await gapi.client.walletobjects.issuer.insert({});

/*
Returns a list of all issuers shared to the caller.
*/
await gapi.client.walletobjects.issuer.list({});

/*
Updates the issuer referenced by the given issuer ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.issuer.patch({resourceId: 'resourceId'});

/*
Updates the issuer referenced by the given issuer ID.
*/
await gapi.client.walletobjects.issuer.update({resourceId: 'resourceId'});

/*
Inserts the resources in the JWT.
*/
await gapi.client.walletobjects.jwt.insert({});

/*
Adds a message to the loyalty class referenced by the given class ID.
*/
await gapi.client.walletobjects.loyaltyclass.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the loyalty class with the given class ID.
*/
await gapi.client.walletobjects.loyaltyclass.get({resourceId: 'resourceId'});

/*
Inserts an loyalty class with the given ID and properties.
*/
await gapi.client.walletobjects.loyaltyclass.insert({});

/*
Returns a list of all loyalty classes for a given issuer ID.
*/
await gapi.client.walletobjects.loyaltyclass.list({});

/*
Updates the loyalty class referenced by the given class ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.loyaltyclass.patch({resourceId: 'resourceId'});

/*
Updates the loyalty class referenced by the given class ID.
*/
await gapi.client.walletobjects.loyaltyclass.update({resourceId: 'resourceId'});

/*
Adds a message to the loyalty object referenced by the given object ID.
*/
await gapi.client.walletobjects.loyaltyobject.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the loyalty object with the given object ID.
*/
await gapi.client.walletobjects.loyaltyobject.get({resourceId: 'resourceId'});

/*
Inserts an loyalty object with the given ID and properties.
*/
await gapi.client.walletobjects.loyaltyobject.insert({});

/*
Returns a list of all loyalty objects for a given issuer ID.
*/
await gapi.client.walletobjects.loyaltyobject.list({});

/*
Modifies linked offer objects for the loyalty object with the given ID.
*/
await gapi.client.walletobjects.loyaltyobject.modifylinkedofferobjects({
  resourceId: 'resourceId',
});

/*
Updates the loyalty object referenced by the given object ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.loyaltyobject.patch({resourceId: 'resourceId'});

/*
Updates the loyalty object referenced by the given object ID.
*/
await gapi.client.walletobjects.loyaltyobject.update({
  resourceId: 'resourceId',
});

/*
Downloads rotating barcode values for the transit object referenced by the given object ID.
*/
await gapi.client.walletobjects.media.download({resourceId: 'resourceId'});

/*
Uploads rotating barcode values for the transit object referenced by the given object ID. Note the max upload size is specified in google3/production/config/cdd/apps-upload/customers/payments-consumer-passes/config.gcl and enforced by Scotty.
*/
await gapi.client.walletobjects.media.upload({resourceId: 'resourceId'});

/*
Adds a message to the offer class referenced by the given class ID.
*/
await gapi.client.walletobjects.offerclass.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the offer class with the given class ID.
*/
await gapi.client.walletobjects.offerclass.get({resourceId: 'resourceId'});

/*
Inserts an offer class with the given ID and properties.
*/
await gapi.client.walletobjects.offerclass.insert({});

/*
Returns a list of all offer classes for a given issuer ID.
*/
await gapi.client.walletobjects.offerclass.list({});

/*
Updates the offer class referenced by the given class ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.offerclass.patch({resourceId: 'resourceId'});

/*
Updates the offer class referenced by the given class ID.
*/
await gapi.client.walletobjects.offerclass.update({resourceId: 'resourceId'});

/*
Adds a message to the offer object referenced by the given object ID.
*/
await gapi.client.walletobjects.offerobject.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the offer object with the given object ID.
*/
await gapi.client.walletobjects.offerobject.get({resourceId: 'resourceId'});

/*
Inserts an offer object with the given ID and properties.
*/
await gapi.client.walletobjects.offerobject.insert({});

/*
Returns a list of all offer objects for a given issuer ID.
*/
await gapi.client.walletobjects.offerobject.list({});

/*
Updates the offer object referenced by the given object ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.offerobject.patch({resourceId: 'resourceId'});

/*
Updates the offer object referenced by the given object ID.
*/
await gapi.client.walletobjects.offerobject.update({resourceId: 'resourceId'});

/*
Returns the permissions for the given issuer id.
*/
await gapi.client.walletobjects.permissions.get({resourceId: 'resourceId'});

/*
Updates the permissions for the given issuer.
*/
await gapi.client.walletobjects.permissions.update({resourceId: 'resourceId'});

/*
Inserts the smart tap.
*/
await gapi.client.walletobjects.smarttap.insert({});

/*
Adds a message to the transit class referenced by the given class ID.
*/
await gapi.client.walletobjects.transitclass.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the transit class with the given class ID.
*/
await gapi.client.walletobjects.transitclass.get({resourceId: 'resourceId'});

/*
Inserts a transit class with the given ID and properties.
*/
await gapi.client.walletobjects.transitclass.insert({});

/*
Returns a list of all transit classes for a given issuer ID.
*/
await gapi.client.walletobjects.transitclass.list({});

/*
Updates the transit class referenced by the given class ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.transitclass.patch({resourceId: 'resourceId'});

/*
Updates the transit class referenced by the given class ID.
*/
await gapi.client.walletobjects.transitclass.update({resourceId: 'resourceId'});

/*
Adds a message to the transit object referenced by the given object ID.
*/
await gapi.client.walletobjects.transitobject.addmessage({
  resourceId: 'resourceId',
});

/*
Returns the transit object with the given object ID.
*/
await gapi.client.walletobjects.transitobject.get({resourceId: 'resourceId'});

/*
Inserts an transit object with the given ID and properties.
*/
await gapi.client.walletobjects.transitobject.insert({});

/*
Returns a list of all transit objects for a given issuer ID.
*/
await gapi.client.walletobjects.transitobject.list({});

/*
Updates the transit object referenced by the given object ID. This method supports patch semantics.
*/
await gapi.client.walletobjects.transitobject.patch({resourceId: 'resourceId'});

/*
Updates the transit object referenced by the given object ID.
*/
await gapi.client.walletobjects.transitobject.update({
  resourceId: 'resourceId',
});
0.0.20241101

10 months ago

0.0.20241031

10 months ago

0.0.20241030

10 months ago

0.0.20241029

10 months ago

0.0.20241028

10 months ago

0.0.20241025

10 months ago

0.0.20241024

10 months ago

0.0.20241022

10 months ago

0.0.20241021

10 months ago

0.0.20241018

10 months ago

0.0.20241017

10 months ago

0.0.20241016

10 months ago

0.0.20241015

10 months ago

0.0.20240925

11 months ago

0.0.20240926

11 months ago

0.0.20240927

11 months ago

0.0.20240930

11 months ago

0.0.20241003

11 months ago

0.0.20241002

11 months ago

0.0.20241001

11 months ago

0.0.20241011

11 months ago

0.0.20241010

11 months ago

0.0.20241014

10 months ago

0.0.20241008

11 months ago

0.0.20241007

11 months ago

0.0.20241009

11 months ago

0.0.20240909

12 months ago

0.0.20240918

11 months ago

0.0.20240919

11 months ago

0.0.20240916

11 months ago

0.0.20240917

11 months ago

0.0.20240910

12 months ago

0.0.20240911

12 months ago

0.0.20240912

11 months ago

0.0.20240913

11 months ago

0.0.20240923

11 months ago

0.0.20240924

11 months ago

0.0.20240920

11 months ago

0.0.20240903

12 months ago

0.0.20240904

12 months ago

0.0.20240905

12 months ago

0.0.20240906

12 months ago

0.0.20240828

12 months ago

0.0.20240829

12 months ago

0.0.20240830

12 months ago

0.0.20240827

12 months ago

0.0.20240606

1 year ago

0.0.20240607

1 year ago

0.0.20240729

1 year ago

0.0.20240723

1 year ago

0.0.20240724

1 year ago

0.0.20240603

1 year ago

0.0.20240725

1 year ago

0.0.20240604

1 year ago

0.0.20240726

1 year ago

0.0.20240722

1 year ago

0.0.20240617

1 year ago

0.0.20240618

1 year ago

0.0.20240613

1 year ago

0.0.20240614

1 year ago

0.0.20240730

1 year ago

0.0.20240731

1 year ago

0.0.20240610

1 year ago

0.0.20240611

1 year ago

0.0.20240612

1 year ago

0.0.20240628

1 year ago

0.0.20240624

1 year ago

0.0.20240625

1 year ago

0.0.20240626

1 year ago

0.0.20240627

1 year ago

0.0.20240620

1 year ago

0.0.20240621

1 year ago

0.0.20240530

1 year ago

0.0.20240531

1 year ago

0.0.20240808

1 year ago

0.0.20240809

1 year ago

0.0.20240529

1 year ago

0.0.20240805

1 year ago

0.0.20240806

1 year ago

0.0.20240801

1 year ago

0.0.20240802

1 year ago

0.0.20240528

1 year ago

0.0.20240522

1 year ago

0.0.20240523

1 year ago

0.0.20240819

1 year ago

0.0.20240815

1 year ago

0.0.20240816

1 year ago

0.0.20240812

1 year ago

0.0.20240813

1 year ago

0.0.20240814

1 year ago

0.0.20240709

1 year ago

0.0.20240826

12 months ago

0.0.20240708

1 year ago

0.0.20240822

1 year ago

0.0.20240701

1 year ago

0.0.20240823

12 months ago

0.0.20240702

1 year ago

0.0.20240703

1 year ago

0.0.20240820

1 year ago

0.0.20240821

1 year ago

0.0.20240716

1 year ago

0.0.20240717

1 year ago

0.0.20240718

1 year ago

0.0.20240719

1 year ago

0.0.20240712

1 year ago

0.0.20240715

1 year ago

0.0.20240710

1 year ago

0.0.20240711

1 year ago

0.0.20240520

1 year ago

0.0.20240521

1 year ago

0.0.20240516

1 year ago

0.0.20240517

1 year ago

0.0.20240515

1 year ago

0.0.20240514

1 year ago

0.0.20240513

1 year ago

0.0.20240510

1 year ago

0.0.20240509

1 year ago

0.0.20240508

1 year ago

0.0.20240507

1 year ago

0.0.20240506

1 year ago

0.0.20240503

1 year ago

0.0.20240502

1 year ago

0.0.20240501

1 year ago

0.0.20240430

1 year ago

0.0.20240429

1 year ago

0.0.20240426

1 year ago

0.0.20240425

1 year ago

0.0.20240424

1 year ago

0.0.20240423

1 year ago

0.0.20240422

1 year ago

0.0.20240419

1 year ago

0.0.20240417

1 year ago

0.0.20240416

1 year ago

0.0.20240415

1 year ago

0.0.20240412

1 year ago

0.0.20240411

1 year ago

0.0.20240410

1 year ago

0.0.20240409

1 year ago

0.0.20240408

1 year ago

0.0.20240405

1 year ago

0.0.20240404

1 year ago

0.0.20240403

1 year ago

0.0.20240401

1 year ago

0.0.20240402

1 year ago

0.0.20240329

1 year ago

0.0.20240327

1 year ago

0.0.20240328

1 year ago

0.0.20240326

1 year ago

0.0.20240325

1 year ago

0.0.20240322

1 year ago

0.0.20240321

1 year ago

0.0.20240320

1 year ago

0.0.20240319

1 year ago

0.0.20240318

1 year ago

0.0.20240315

1 year ago

0.0.20240314

1 year ago

0.0.20240312

1 year ago

0.0.20240313

1 year ago

0.0.20240308

1 year ago

0.0.20240307

1 year ago

0.0.20240306

1 year ago

0.0.20240305

1 year ago

0.0.20240304

1 year ago

0.0.20240229

1 year ago

0.0.20240228

1 year ago

0.0.20240227

1 year ago

0.0.20240226

1 year ago

0.0.20240222

1 year ago

0.0.20240223

1 year ago

0.0.20240221

2 years ago

0.0.20240220

2 years ago

0.0.20240216

2 years ago

0.0.20240215

2 years ago

0.0.20240214

2 years ago

0.0.20240213

2 years ago

0.0.20240212

2 years ago

0.0.20240209

2 years ago

0.0.20240208

2 years ago

0.0.20240207

2 years ago

0.0.20240206

2 years ago

0.0.20240205

2 years ago

0.0.20240202

2 years ago

0.0.20240201

2 years ago

0.0.20240131

2 years ago

0.0.20240130

2 years ago

0.0.20240129

2 years ago

0.0.20240125

2 years ago

0.0.20240126

2 years ago

0.0.20240124

2 years ago

0.0.20240122

2 years ago

0.0.20240123

2 years ago

0.0.20240119

2 years ago

0.0.20240118

2 years ago

0.0.20240117

2 years ago

0.0.20240116

2 years ago

0.0.20240112

2 years ago

0.0.20240110

2 years ago

0.0.20240111

2 years ago

0.0.20240109

2 years ago

0.0.20240108

2 years ago

0.0.20240105

2 years ago

0.0.20240104

2 years ago

0.0.20240103

2 years ago

0.0.20231213

2 years ago

0.0.20231212

2 years ago

0.0.20231211

2 years ago

0.0.20231207

2 years ago

0.0.20231208

2 years ago

0.0.20231206

2 years ago

0.0.20231205

2 years ago

0.0.20231204

2 years ago

0.0.20231129

2 years ago