Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-zijdemans-vipps committed Jan 2, 2024
1 parent 51c78ae commit 61eddbe
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions sample_code/agreement_sample.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "https://deno.land/std@0.209.0/dotenv/load.ts";
import { Client } from "../src/mod.ts";
import "https://deno.land/std@0.210.0/dotenv/load.ts";
import { Client } from "https://deno.land/x/vipps_mobilepay_sdk@0.3.0/mod.ts";

// First, get your API keys from https://portal.vipps.no/
// Here we assume they are stored in a .env file, see .env.example
Expand Down
4 changes: 2 additions & 2 deletions sample_code/callbackQR_sample.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "https://deno.land/std@0.209.0/dotenv/load.ts";
import { Client } from "../src/mod.ts";
import "https://deno.land/std@0.210.0/dotenv/load.ts";
import { Client } from "https://deno.land/x/vipps_mobilepay_sdk@0.3.0/mod.ts";

// First, get your API keys from https://portal.vipps.no/
// Here we assume they are stored in a .env file, see .env.example
Expand Down
4 changes: 2 additions & 2 deletions sample_code/charge_sample.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "https://deno.land/std@0.209.0/dotenv/load.ts";
import { Client } from "../src/mod.ts";
import "https://deno.land/std@0.210.0/dotenv/load.ts";
import { Client } from "https://deno.land/x/vipps_mobilepay_sdk@0.3.0/mod.ts";

// First, get your API keys from https://portal.vipps.no/
// Here we assume they are stored in a .env file, see .env.example
Expand Down
4 changes: 2 additions & 2 deletions sample_code/checkout_sample.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "https://deno.land/std@0.209.0/dotenv/load.ts";
import { Client } from "https://deno.land/x/vipps_mobilepay_sdk@0.1.0/mod.ts";
import "https://deno.land/std@0.210.0/dotenv/load.ts";
import { Client } from "https://deno.land/x/vipps_mobilepay_sdk@0.3.0/mod.ts";

// First, get your API keys from https://portal.vipps.no/
// Here we assume they are stored in a .env file, see .env.example
Expand Down
4 changes: 2 additions & 2 deletions sample_code/epayment_sample.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { open } from "https://deno.land/x/open@v0.0.6/index.ts";
import "https://deno.land/std@0.209.0/dotenv/load.ts";
import { Client } from "https://deno.land/x/vipps_mobilepay_sdk@0.1.0/mod.ts";
import "https://deno.land/std@0.210.0/dotenv/load.ts";
import { Client } from "https://deno.land/x/vipps_mobilepay_sdk@0.3.0/mod.ts";

// First, get your API keys from https://portal.vipps.no/
// Here we assume they are stored in a .env file, see .env.example
Expand Down
2 changes: 1 addition & 1 deletion sample_code/redirectQR_sample.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "https://deno.land/std@0.209.0/dotenv/load.ts";
import "https://deno.land/std@0.210.0/dotenv/load.ts";
import { Client } from "../src/mod.ts";

// First, get your API keys from https://portal.vipps.no/
Expand Down
4 changes: 2 additions & 2 deletions sample_code/webhook_sample.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "https://deno.land/std@0.209.0/dotenv/load.ts";
import { Client } from "https://deno.land/x/vipps_mobilepay_sdk@0.1.0/mod.ts";
import "https://deno.land/std@0.210.0/dotenv/load.ts";
import { Client } from "https://deno.land/x/vipps_mobilepay_sdk@0.3.0/mod.ts";

// First, get your API keys from https://portal.vipps.no/
// Here we assume they are stored in a .env file, see .env.example
Expand Down
22 changes: 11 additions & 11 deletions src/apis/recurring.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { RequestData } from "../types.ts";
import {
AgreementForceAcceptV3,
AgreementPatchV3,
AgreementForceAcceptV3Request,
AgreementPatchV3Request,
AgreementResponseV3,
AgreementStatus,
ChargeModification,
ChargeModificationRequest,
ChargeReference,
ChargeResponseV3,
ChargeStatus,
CreateChargeV3,
CreateChargeV3Request,
DraftAgreementResponseV3,
DraftAgreementV3,
DraftAgreementV3Request,
RecurringErrorResponse,
} from "./types/recurring_types.ts";

Expand Down Expand Up @@ -40,7 +40,7 @@ export const agreementRequestFactory = {
*/
create(
token: string,
body: DraftAgreementV3,
body: DraftAgreementV3Request,
): RequestData<DraftAgreementResponseV3, RecurringErrorResponse> {
return {
url: "/recurring/v3/agreements",
Expand Down Expand Up @@ -103,7 +103,7 @@ export const agreementRequestFactory = {
update(
token: string,
agreementId: string,
body: AgreementPatchV3,
body: AgreementPatchV3Request,
): RequestData<void, RecurringErrorResponse> {
return {
url: `/recurring/v3/agreements/${agreementId}`,
Expand All @@ -124,7 +124,7 @@ export const agreementRequestFactory = {
forceAccept(
token: string,
agreementId: string,
body: AgreementForceAcceptV3,
body: AgreementForceAcceptV3Request,
): RequestData<void, RecurringErrorResponse> {
return {
url: `/recurring/v3/agreements/${agreementId}/accept`,
Expand All @@ -151,7 +151,7 @@ export const chargeRequestFactory = {
create(
token: string,
agreementId: string,
body: CreateChargeV3,
body: CreateChargeV3Request,
): RequestData<ChargeReference, RecurringErrorResponse> {
return {
url: `/recurring/v3/agreements/${agreementId}/charges`,
Expand Down Expand Up @@ -259,7 +259,7 @@ export const chargeRequestFactory = {
token: string,
agreementId: string,
chargeId: string,
body: ChargeModification,
body: ChargeModificationRequest,
): RequestData<void, RecurringErrorResponse> {
return {
url:
Expand All @@ -282,7 +282,7 @@ export const chargeRequestFactory = {
token: string,
agreementId: string,
chargeId: string,
body: ChargeModification,
body: ChargeModificationRequest,
): RequestData<void, RecurringErrorResponse> {
return {
url: `/recurring/v3/agreements/${agreementId}/charges/${chargeId}/refund`,
Expand Down
10 changes: 5 additions & 5 deletions src/apis/types/recurring_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export type RecurringErrorFromAzure = {

//////////////// Charge types /////////////////

export type CreateChargeV3 = {
export type CreateChargeV3Request = {
/**
* Amount to be paid by the customer.
*
Expand Down Expand Up @@ -349,7 +349,7 @@ export type ChargeEvent = {
};

/** Refund charge request */
export type ChargeModification = {
export type ChargeModificationRequest = {
/**
* The amount to refund/capture on a charge.
*
Expand Down Expand Up @@ -377,7 +377,7 @@ export type ChargeModification = {
export type AgreementStatus = "PENDING" | "ACTIVE" | "STOPPED" | "EXPIRED";

////////////// Create agreement ///////////////
export type DraftAgreementV3 = {
export type DraftAgreementV3Request = {
campaign?: AgreementCampaignV3;
pricing: AgreementPricingRequest;
/**
Expand Down Expand Up @@ -800,7 +800,7 @@ export type AgreementVariableAmountPricingResponse = {
};

////////////// Update agreements //////////////
export type AgreementPatchV3 = {
export type AgreementPatchV3Request = {
/**
* Name of the product being subscribed to.
* @maxLength 45
Expand Down Expand Up @@ -882,7 +882,7 @@ export type AgreementPricingUpdateRequest = {
suggestedMaxAmount?: number;
};

export type AgreementForceAcceptV3 = {
export type AgreementForceAcceptV3Request = {
/** @example "4791234567" */
phoneNumber: string;
};
Expand Down

0 comments on commit 61eddbe

Please sign in to comment.